How to load pre trained agent model and simulation by using it?
3 次查看(过去 30 天)
显示 更早的评论
I wanna do simulation by using pre trainned model(agnet).
How should I do ? And Is there a way to check if I can use the trained model (display of training manager, etc.)?
Is it possible to extract observation data from the model?
agentOptions = rlSACAgentOptions;
agentOptions.SampleTime = Ts;
agentOptions.DiscountFactor = 0.5;
agentOptions.TargetSmoothFactor = 1e-3;
agentOptions.ExperienceBufferLength = 1e6;
agentOptions.MiniBatchSize = 1024;
agentOptions.EntropyWeightOptions.TargetEntropy = -1;
agent = rlSACAgent(actor,[critic1 critic2],agentOptions); % What should i do here
maxepisodes = 15000;
maxsteps = 1e6;
trainingOptions = rlTrainingOptions(...
'MaxEpisodes',maxepisodes,...
'MaxStepsPerEpisode',maxsteps,...
'StopOnError','on',...
'Verbose',true,...
'Plots','training-progress',...
'StopTrainingCriteria','AverageReward',...
'StopTrainingValue',Inf,...
'ScoreAveragingWindowLength',10);
%% is this correct way?
load("K35_cal2_joint1_60.mat","agent")
agent = agent;
trainingStats = train(agent,env,trainingOptions);
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!