ElegantRL icon indicating copy to clipboard operation
ElegantRL copied to clipboard

A ERROR about test

Open guest-oo opened this issue 1 year ago • 1 comments

当使用demo_DQN_Dueling_Double_DQN 训练结束的的pt文件无法作为测试时的权重文件 ,是否需要将保存pt文件 由torch.save(actor, actor_path) 更改为torch.save(actor.state_dict(), actor_path)

guest-oo avatar Apr 26 '24 08:04 guest-oo

Hi, have you tried to load the pt file by using torch.load(file_path)? In addition, there is method save_or_load_agent() in the AgentBase class, which you may utilize.

stellawang196 avatar Jun 01 '24 00:06 stellawang196