TD3 error message for using ltsm layer in Neural Network
Ältere Kommentare anzeigen
Hi! I am trying to design a reinforcement learning model for landing mission on the moon in a defined region. I played with different Agents algorithm such as PPO, DDPG and TD3 to evaluate how they work differently.
With PPO I don't have problems related to error in the code or in the network architecture so at the moment I am working with it. The problem is when I try to use DDPG and TD3 with recurrent neural network, including an lstm layer in the architecture, I obtain the following error message:
Error using dlnetwork/predict (line 664)
Layer 'lstm': Invalid input data. Input data must contain a dimension labeled 'T' and must not contain any non-singleton dimensions labeled 'U'.
Error in rl.representation.model.rlDLNetworkModel/cacheNetworkSize (line 588)
[DummyOutput{:}] = predict(this.InternalNetwork,DummyInput{:},'Acceleration','none');
Error in rl.representation.model.rlDLNetworkModel (line 90)
this = cacheNetworkSize(this);
Error in rl.util.createInternalModelFactory (line 16)
Model = rl.representation.model.rlDLNetworkModel(Model, UseDevice, ObservationNames, ActionNames);
Error in rlDeterministicActorRepresentation (line 86)
Model = rl.util.createInternalModelFactory(Model, Options, ObservationNames, ActionNames, InputSize, OutputSize);
Error in agentCreator (line 236)
actor = rlDeterministicActorRepresentation(actnet,obsInfo,actInfo,"Observation","obs","Action","fcact",opts)
Error in main (line 26)
[agent] = agentCreator(numObs,obsInfo,obsInfocr,numAct,actInfo,'TD3_recurrent');
The Neural Network I am trying to implement is the following:
actnet = [featureInputLayer(numObs,"Name","obs");
fullyConnectedLayer(50,"Name","fc1");
fullyConnectedLayer(30,"Name","fc2");
reluLayer('Name','relu1');
lstmLayer(8,'OutputMode','sequence','Name','lstm')
fullyConnectedLayer(4,"Name","fcact")];
I looked for documentation but I cannot find any help.
Can someone clarify this for me?
Thaks!
2 Kommentare
yanqi liu
am 17 Jan. 2022
yes,sir,may be upload your data mat file,then we can debug it
Francesco Mogetti
am 17 Jan. 2022
Bearbeitet: Francesco Mogetti
am 17 Jan. 2022
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Reinforcement Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!