How to implement reinforcement learning in Dspace using code generation
9 ビュー (過去 30 日間)
古いコメントを表示
Davoud Mokhtari Andani
2023 年 8 月 31 日
コメント済み: Davoud Mokhtari Andani
2023 年 9 月 8 日
I have trained a nonlinear model using Reinforcement learning via MATLAB 2022b and now I want to implement the reinforcement learning block in dSPACE using code generation, while the simulink will pop out the error "Code generation does not support importing handle classes from matlab".What should I do to fix this error? Thank you very much. Any suggestions are appreciated.
0 件のコメント
採用された回答
Milan Bansal
2023 年 9 月 7 日
Hi,
As per my understanding you are facing an error when implementing Reinforcement Learning (RL) Agent block using code generation.
The Reinforcement Learning Agent block does not support code generation for training. A workaround for this issue is to use Simulink Blocks such as MATLAB function Block or "Predict" block from Deep Learning Toolbox in place of RL Agent Block, which will allow using pre-trained networks including RL Policies in Simulink and supports code generation.
Refer to the MATLAB Answer link below which resolves a similar issue.
However, if the error is due to code generation for MATALB handle class, it is required to have a function that invokes the class.
Refer to the example in the documentation link given below.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!