自己在python编写的基于pytorch的深度强化学习算法能否导入matlab/simulink
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
通过查看importNetworkFromPyTorch文档,里面的模型都是预定义好的自由度较小,那么我自己编写的基于pytorch的深度强化学习算法能否导入进来呢?
0 commentaires
Réponses (1)
Krishna
le 11 Fév 2024
Hello yfxcore,
You can indeed import Pytorch and TensorFlow models into MATLAB/Simulink. To do so for Pytorch, you can use the function called 'importNetworkFromPyTorch'. For additional information, consult the following documentation:
The function importNetworkFromPyTorch(model file) allows you to import a pretrained and traced Pytorch model from the specified model file. This function returns the network as an uninitialized ‘dlnetwork’ object. To use importNetworkFromPyTorch, you need the Deep Learning Toolbox Converter for Pytorch Models support package.
This dlnetworks object can be converted into a Simulink model using predict block. For more information on predict block follow the following documentation,
Also please refer to the following guidelines to ask questions on MATLAB answer and get better response,
Hope this helps.
0 commentaires
Voir également
Catégories
En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!