莫烦pytorch教程中DQN代码IndexError: too many indices for array

最初代码:
action = torch.max(actions_value, 1)[1].data.numpy()[0, 0] # return the argmax

修改后代码:
action = torch.max(actions_value, 1)[1].data.numpy()[0] # return the argmax

参考:
https://morvanzhou.github.io/tutorials/machine-learning/torch/4-05-DQN/链接下面的评论


版权声明:本文为qs17809259715原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。