Codegen respond with an error: "??Expected a character vector. "

5 visualizaciones (últimos 30 días)
Haonan Ding
Haonan Ding el 8 de Mayo de 2021
Respondida: Paras Gupta el 21 de Jun. de 2024
When I use my training results of DDPG model to generate GPU code, there always respond an error. I followed the instruction "Deploy Trained Reinforcement Learning Policies" from help document, and it runs well in other exmples. Here is error report:
And return code:
>>codegen('-config','cfg','evaluatePolicy','-args',argstr,'-report');
??? Expected a character vector.
Code generation failed: View Error Report
Incorrect use of codegen
  7 comentarios
XingZhou Mu
XingZhou Mu el 14 de Abr. de 2024
Hello, did you solve this problem, I am also having the same problem
Jie Li
Jie Li el 9 de Mayo de 2024
竟然是中文路径的问题!改成英文路径就OK了

Iniciar sesión para comentar.

Respuestas (1)

Paras Gupta
Paras Gupta el 21 de Jun. de 2024
Hello Haonan,
I understand that you're encountering the error "??? Expected a character vector."
This issue could arise if the name of the specified MAT-file or the absolute file path to the MAT-file contains non-ASCII characters, which are not supported by codegen. Please refer to the 'Limitations' section of the following documentation.
You can also refer to the below documentation for more information on character encoding in code generation:
Hope this resolves the query.

Categorías

Más información sobre Deep Learning Code Generation Fundamentals 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!

Translated by