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

조회 수: 5 (최근 30일)
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
Joss Knight
Joss Knight 2024년 4월 14일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Reinforcement Learning에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by