Closed mlaves closed 5 years ago
Hey, thanks for the PR.
For the examples given in the repository, this operation is done at image pre-processing level (once).
If it is not done there, requires_grad = True
must be added to each operation, meaning more unnecessary LOC added to each file.
I must have overseen this. Thanks for pointing that out.
I had problems with your code using my own CNN and data, because the gradients where not computed up to the input image. Therefore,
grad_in[0]
inhook_function
wasNone
. Manually settingrequires_grad = True
for the input data solved the issue for me.