Skip to content

filter_visualizer (and img reference) #7

@RR5555

Description

@RR5555

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions