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

meet Runtime error when training deblur codes #112

Closed
hm-better opened this issue May 7, 2022 · 4 comments
Closed

meet Runtime error when training deblur codes #112

hm-better opened this issue May 7, 2022 · 4 comments

Comments

@hm-better
Copy link

Traceback (most recent call last):
File "/data/h00026370/Moon/codes/MPRNet/Deblurring/train.py", line 120, in
loss_char = np.sum([criterion_char(restored[j],target) for j in range(len(restored))])
File "<array_function internals>", line 6, in sum
File "/home/leipeng/anaconda3/envs/mprnet/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2260, in sum
initial=initial, where=where)
File "/home/leipeng/anaconda3/envs/mprnet/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
File "/home/leipeng/anaconda3/envs/mprnet/lib/python3.7/site-packages/torch/tensor.py", line 458, in array
return self.numpy()
RuntimeError: Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead.

@linqwn
Copy link

linqwn commented May 7, 2022

I hope the author can answer this question,thanks.

@swz30
Copy link
Owner

swz30 commented May 7, 2022

Please check this #101 (comment)

@linqwn
Copy link

linqwn commented May 7, 2022

According to what you said, the following problem appears again
image

@swz30
Copy link
Owner

swz30 commented May 7, 2022

See this #108 (comment)

@swz30 swz30 closed this as completed May 27, 2022
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