Error while running reinforcement learning agent

Error:-
Error using rl.env.SimulinkEnvWithAgent>localHandleSimoutErrors (line 681)
Invalid input argument type or size such as observation, reward, isdone or loggedSignals.
Error using rl.env.SimulinkEnvWithAgent>localHandleSimoutErrors (line 681)
Unable to compute gradient from representation.
Error using rl.env.SimulinkEnvWithAgent>localHandleSimoutErrors (line 681)
Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
Running code using cpu. Matlab version 2020b.
Checked the dimesion and size all looks proper. What can be the possible cause of error

4 件のコメント

Walter Roberson
Walter Roberson 2021 年 9 月 15 日
What is the class and size of the parameters you are using?
Gaurav Shetty
Gaurav Shetty 2021 年 9 月 15 日
For the observation I am taking [12 1] matrix inputs and giving [3 1] output, all of them are continous data and type is double
Gaurav Shetty
Gaurav Shetty 2021 年 9 月 15 日
This is the code:-
obsInfo=rlNumericSpec([12,1]);
obsInfo.Name="observations";
obsInfo.Description='velx ,vely ,velz ,rollrate ,pitchrate ,yawrate ,bankangle ,pitchangle ,yawangle ,pn ,pe ,pd';
numObservations = obsInfo.Dimension(1);
actInfo=rlNumericSpec([3,1],...
'LowerLimit',[-25*(pi/180) -25*(pi/180) -30*(pi/180)]',...
'UpperLimit',[25*(pi/180) 25*(pi/180) 30*(pi/180)]');
actInfo.Name="controldeflection";
actInfo.Description='aileron ,tail ,ruddder';
numActions = actInfo.Dimension(1);
env = rlSimulinkEnv('rcam_reinforcement_test1','rcam_reinforcement_test1/RL Agent',obsInfo,actInfo);
Guanlong Chen
Guanlong Chen 2022 年 5 月 26 日
Have you solved your problem? I have met the same problem

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

製品

リリース

R2020b

質問済み:

2021 年 9 月 15 日

コメント済み:

2022 年 5 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by