PARL icon indicating copy to clipboard operation
PARL copied to clipboard

InvalidArgumentError

Open longqianlanqiu opened this issue 3 years ago • 6 comments

尝试使用paddle的DQN算法训练gym中的环境时,出现了如下报错: InvalidArgumentError: After flatten the input tensor X and Y to 2-D dimensions matrix X1 and Y1, the matrix X1's width must be equal with matrix Y1's height. But received X's shape = [1, 210, 160, 3], X1's shape = [1, 100800], X1's width = 100800; Y's shape = [210, 128], Y1's shape = [210, 128], Y1's height = 210. [Hint: Expected x_mat_dims[1] == y_mat_dims[0], but received x_mat_dims[1]:100800 != y_mat_dims[0]:210.] at (D:\1.8.5\paddle\paddle\fluid\operators\mul_op.cc:83) [operator < mul > error] 请问是哪里出错? 训练的环境是:SpaceInvaders-v0

longqianlanqiu avatar May 25 '21 15:05 longqianlanqiu

你使用的是PARL仓库中的代码吗?还是用paddle自己写的代码呢?

TomorrowIsAnOtherDay avatar May 26 '21 02:05 TomorrowIsAnOtherDay

是使用的仓库的代码

longqianlanqiu avatar May 26 '21 14:05 longqianlanqiu

了解了,还请把你的paddle、parl版本发一下。 我们这边本地先复现问题再提供解决方案哈。

TomorrowIsAnOtherDay avatar May 27 '21 02:05 TomorrowIsAnOtherDay

paddle 版本是1.8.5CPU parl版本是1.4.3

longqianlanqiu avatar May 27 '21 08:05 longqianlanqiu

收到:)感谢反馈

TomorrowIsAnOtherDay avatar May 27 '21 08:05 TomorrowIsAnOtherDay

hello,我发现新版本的atari-py 以及gym向后兼容不友好。 建议安装如下版本的:

pip install atari-py==0.1.15
pip install gym=0.12.0

TomorrowIsAnOtherDay avatar May 28 '21 02:05 TomorrowIsAnOtherDay