AI4Finance-Foundation / AI4Finance-Foundation/FinRL-Meta

Not able to run Demo_Plug_and_Play_with_DRL_Libraries notebook at the second time

Aperta
#19 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Python
Stelle
1.9k
Fork
751
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Not able to run again Demo_Plug_and_Play_with_DRL_Libraries notebook at Colab.
When you run this notebook at the second time, it will give you the error message,

RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/finrl/drl_agents/elegantrl/models.py in DRL_prediction(model_name, cwd, net_dimension, environment)
101 agent.init(net_dim, state_dim, action_dim)
--> 102 agent.save_or_load_agent(cwd=cwd, if_save=False)
103 act = agent.act

5 frames
RuntimeError: Error(s) in loading state_dict for ActorPPO:
size mismatch for a_std_log: copying a param with shape torch.Size([1, 29]) from checkpoint, the shape in current model is torch.Size([1, 30]).
size mismatch for net.0.0.weight: copying a param with shape torch.Size([512, 293]) from checkpoint, the shape in current model is torch.Size([512, 303]).
size mismatch for net.3.weight: copying a param with shape torch.Size([29, 512]) from checkpoint, the shape in current model is torch.Size([30, 512]).
size mismatch for net.3.bias: copying a param with shape torch.Size([29]) from checkpoint, the shape in current model is torch.Size([30]).

During handling of the above exception, another exception occurred:

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.