importNetworkFromKeras
Description
Add-On Required: This feature requires the Deep Learning Toolbox Converter for TensorFlow Models add-on.
imports a Keras 3 model from the folder net = importNetworkFromKeras(modelFolder)modelFolder. The function
returns the network net as a dlnetwork object.
Note
The importNetworkFromKeras function is recommended for importing models
created using the Keras 3 API and saved using the matlabsaver.py
utility function. See Save Keras 3 models using matlabsaver.py for more.
Examples
Input Arguments
Output Arguments
More About
Alternative Functionality
Use importNetworkFromKeras to import a network created using the Keras 3 API or
TensorFlow versions 2.16 and later. This is the preferred way of importing networks with
Keras 3 specific features such as Keras Ops. If you are using TensorFlow versions 2.15 and earlier or can downgrade to Keras 2, use the importNetworkFromTensorFlow function. This will result in more layers imported
as MATLAB layers capable of code generation.
References
[1] Keras: The Python Deep Learning library https://keras.io.
Version History
Introduced in R2026a
