Open churchillyik opened 1 year ago
这里是我在把 A2C 和 PPO 合并的时候出错了。这两个issue 应该是同一个问题: https://github.com/AI4Finance-Foundation/ElegantRL/issues/306
我会一起更新代码解决它们。谢谢你
另外,在elegantrl/train
/run.py,Learner进程里面的这句:
actions = torch.empty((horizon_len, num_seqs, action_dim), dtype=torch.float32, device=agent.device)
是否应该改为:
actions = torch.empty((horizon_len, num_seqs, 1 if if_discrete else action_dim), dtype=torch.float32, device=agent.device)
并在前面加上:
if_discrete = args.if_discrete
这里是我在把 A2C 和 PPO 合并的时候出错了。这两个issue 应该是同一个问题: #306
我会一起更新代码解决它们。谢谢你
哥,还没更新吗
执行
python demo_A2C_PPO.py --gpu=0 --drl=0 --env=6
出现异常在这句下断点,并打印变量如下:
tensor_action只有一个维度,与参数dim=1不符