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

filter_visualizer (and img reference) #7

Open
RR5555 opened this issue Nov 15, 2019 · 1 comment
Open

filter_visualizer (and img reference) #7

RR5555 opened this issue Nov 15, 2019 · 1 comment

Comments

@RR5555
Copy link

RR5555 commented Nov 15, 2019

Greetings,
I adapted your code in ''pure'' pytorch and replaced the calls to cv2 by calls to PIL.
In doing so, I bumped into what could cause an issue in the original code (though I did never run the original code, so maybe it does not), in the hook, I believe that:
self.features = torch.tensor(output,requires_grad=True).cuda()
could actually break the backward of the loss.
Replacing it by:
self.features = output
did solve the problem.

A detail that could be nice to change would be to add the picture used in the Calculate... notebook in the "pictures" directory and modify the corresponding call:
picture = PIL.Image.open("test/206px-Wattledcranethumb.jpg")

PS: Thank you very much for your post on towardsdatascience and the associated code.

@leopardyao
Copy link

leopardyao commented Dec 29, 2020

beautiful code but the above issue is also exactly the problem which I am running into
pytorch/pytorch#42188

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

2 participants