Effacer les filtres
Effacer les filtres

Training reinforcement learning agent in Matlab is slow after setting use Parallel to true.

11 vues (au cours des 30 derniers jours)
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.
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 commentaire
Joss Knight
Joss Knight le 14 Avr 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Training and Simulation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by