Skip to content
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

大佬你好,训练的时候出现这个问题了,这是啥情况啊 #35

Closed
wangshicr7 opened this issue Jun 12, 2019 · 2 comments
Closed

Comments

@wangshicr7
Copy link

loss_semi_adv_value += loss_semi_adv.data.cpu().numpy()[0]/args.lambda_semi_adv
IndexError: too many indices for array

@hfslyc
Copy link
Owner

hfslyc commented Jun 28, 2019

This repo was using Pytorch 0.2, which has a different behavior than recent version on single scalar. You could remove the [0] and it should work.

@hfslyc hfslyc closed this as completed Jun 28, 2019
@gxwangupc
Copy link

loss_semi_adv_value += loss_semi_adv.data.cpu().numpy()[0]/args.lambda_semi_adv
IndexError: too many indices for array

hahhahahha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants