How to save a trained deep learning model in .mat format in Python and load it in MATLAB
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
simParameters.DLNetworkFilename = 'TrainedNetwork.mat'
For example I want to train a deep learning model in python and save it with the name 'TrainedNetwork.mat'.
And the load this network in MATLAB
0 comentarios
Respuestas (1)
Raj
el 2 de Abr. de 2024
As per my understanding, a better alternative to saving a deep learning model in .mat format in Python and loading it in MATLAB will be importing the model to MATLAB itself and then saving it in .mat format.
MATLAB provides the 'importNetworkFromTensorFlow' function to directly import TensorFlow network as MATLAB network.
Saving the model in .mat format in Python may not be an efficient format for large models or complex architecture. Using the 'scipy.io.savemat' function under the SciPy pyton library, you can save the array objects in the given dictionary to a MATLAB- style .mat file, but that will not be a recommended approach in this scenario
Additionally you can refer to the following documentation link on the 'importNetworkFromTensorFlow' function for better understanding-
I hope this solves your query!
0 comentarios
Ver también
Categorías
Más información sobre Call Python from MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!