Reinforcement-learning-with-PyTorch
Reinforcement-learning-with-PyTorch copied to clipboard
5_Deep_Q_Network中RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.增加了detach()也一样报错,输出loss图异常
在loss反向传播后需要detach()一下才能继续画图
感谢大佬
您的来信已收到,祝您生活愉快!