We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
兜哥您好,我在复现您的code/5-jsma-pytorch.ipynb代码时候,发现循环训练中最后一行 img.data[idx]=np.clip(img.data[idx], min_, max_) 该行代码在cuda上运行需要修改,img在cuda上运行的时候,因为img是cuda tensor,需要转化为cpu tensor,再进行numpy运算。 img.data[idx]=np.clip(img.data[idx].cpu(), min_, max_)
img.data[idx]=np.clip(img.data[idx], min_, max_)
img.data[idx]=np.clip(img.data[idx].cpu(), min_, max_)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
兜哥您好,我在复现您的code/5-jsma-pytorch.ipynb代码时候,发现循环训练中最后一行
img.data[idx]=np.clip(img.data[idx], min_, max_)
该行代码在cuda上运行需要修改,img在cuda上运行的时候,因为img是cuda tensor,需要转化为cpu tensor,再进行numpy运算。
img.data[idx]=np.clip(img.data[idx].cpu(), min_, max_)
The text was updated successfully, but these errors were encountered: