自己在python编​写的基于pytorc​h的深度强化学习算法​能否导入matlab​/simulink

18 vues (au cours des 30 derniers jours)
yfxcore
yfxcore le 31 Jan 2024
Réponse apportée : Krishna le 11 Fév 2024
通过查看importNetworkFromPyTorch文档,里面的模型都是预定义好的自由度较小,那么我自己编写的基于pytorch的深度强化学习算法能否导入进来呢?

Réponses (1)

Krishna
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.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!