Custom Training Loop with configured DDPG Agent
조회 수: 10 (최근 30일)
이전 댓글 표시
Hello,
is there the possibility to do a custom training loop with a already configured DDPG agent?
Background: I want to check after each episode whether the average reward has reached a new maximum. When a new maximum is reached, the agent should be saved to a mat file, otherwise not in order to reduce the amount of data. In the training options, I can only set a limit for when the agent should be saved. But then all agents are saved as soon as the limit is exceeded.
Thanks!
Best regards,
allmo
댓글 수: 0
채택된 답변
Poorna
2023년 8월 30일
Hi,
I understand that you would like to save the agent after every episode based on whether the new episode's reward is greater than the existing average reward. You can achieve this by using “rlDataLogger”.
fileLgr = rlDataLogger();
Then, you can do this:
fileLgr.EpisodeFinishedFcn = @myEpisodeFinishedFcn;
where myEpisodeFinishedFcn is your custom function which implements the logic to conditionally save the agent to disk.
Hope this helps!
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Training and Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!