-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,我在运行ELEGANT.py进行训练的时候,在迭代到100次的时候程序报错,请问是什么问题呢? #22
Comments
我之前没有遇到这个问题,你检查一下这个error是在运行哪一行报出来的,不知道是不是和环境配置有关系 |
在ELEGANT.py文件的第251行这里。就是'loss_D':self.loss_D.data.cpu().numpy()[0] |
在ELEGANT.py文件的第251行这里。就是'loss_D':self.loss_D.data.cpu().numpy()[0] |
应该就是torch版本的问题吧,您的是0.3.0,所以在251行的写法和torch1.7.1的写法不一样,导致索引出问题了。 |
版本不一样,把 'loss_D':self.loss_D.data.cpu().numpy()[0] 后的[0]删掉就没有了 |
好的,谢谢老哥。之前已经改出来了,但是这个在训练和测试时候,图像上会出现一些蓝点,也不清楚是什么问题。 |
可以参考一下您的代码吗?我这边改完代码后训练和测试都遇到了很多问题,跑不出训练图片和测试图片,而且loss损失不收敛。我怀疑我改的出错了。如果方便的话可以发代码到 c1122335966@163.com 。十分感谢!! |
错误是:IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
我试着改过,但改了几种都不行,这个和step的值有关,step设置多少,就在训练到多少的时候出错。
期待您的回答,谢谢您。
The text was updated successfully, but these errors were encountered: