필터 지우기
필터 지우기

Change learning rate of RL DDPG networks after 1st training

조회 수: 2 (최근 30일)
Abdul Basith Ashraf
Abdul Basith Ashraf 2020년 10월 14일
댓글: Jonathan Zea 2022년 1월 27일
I trained my DDPG networks using a particular learning rate. Now I want to improve the network by using a lower learning rate.
How do I change the learning rate without losing my perviously trained results?
  댓글 수: 1
Jonathan Zea
Jonathan Zea 2022년 1월 27일
I think you can train with your initial learning rate for a while, save the agent using the saveAgent option, loading after, and then change the learning rate and restart training.
% telling matlab to save the agent from 10 episode in folder "myfolder".
opts = rlTrainingOptions(...
'SaveAgentDirectory', myfolder, 'SaveAgentValue', 10);
% training agent in environment
trainingInfo = train(agent, env, opts);
After training for a while...
agent = load(...) % load the trained agent
actor = agent.getActor;
actor.Options.LearnRate = 0.001; % your new learning rate
agent = agent.setActor(actor);
% retrain agent in environment
trainingInfo = train(agent, env, opts);

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by