How to implement reinforcement learning in Dspace using code generation
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Davoud Mokhtari Andani
el 31 de Ag. de 2023
Comentada: Davoud Mokhtari Andani
el 8 de Sept. de 2023
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 comentarios
Respuesta aceptada
Milan Bansal
el 7 de Sept. de 2023
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder 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!