AI4Finance-Foundation / ElegantRL

Massively Parallel Deep Reinforcement Learning. 🔥
https://ai4finance.org
Other
3.62k stars 833 forks source link

A ERROR about test #355

Open guest-oo opened 4 months ago

guest-oo commented 4 months ago

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

stellawang196 commented 3 months ago

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.