Training reinforcement learning agent in Matlab is slow after setting use Parallel to true.
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to train SAC agent which has 19 observation and 4 action all continuous. The whole agent was created similar to the example provided in matlab website (Train SAC Agent for Ball Balance Control - MATLAB & Simulink (mathworks.com)). When useParallel option is set to false the simulation works but very slowly and the agent starts training the the episode rewards are all displayed. After setting the useparallel to true the system shows that it is training but no results are shown that is the simulation is stuck at episode 1. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1659096/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1659096/image.png)
Here is training options:
trainOpts = rlTrainingOptions(...
'MaxEpisodes', 10000, ...
'MaxStepsPerEpisode', floor(Tf/Ts), ...
'ScoreAveragingWindowLength',100,...
'Verbose', 1, ...
'Plots', 'training-progress', ...
'StopTrainingCriteria','None',...
'SaveAgentCriteria',"EpisodeFrequency", ...
'SaveAgentValue', 100, ...
'UseParallel',true);
Tried running both with sync as well as async but same result as above that is training stuck at 1st episode. What can be the posiible reason for this and can i use my gpu for training?
1 Kommentar
Joss Knight
am 14 Apr. 2024
This is a guess, but if this is running on the CPU probably all that's happened you lose multithreading and gain a bunch of communication overhead. Unless you have a compute cluster, best to stick to serial computation.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Training and Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!