ProGamerGov / neural-dream

PyTorch implementation of DeepDream algorithm
MIT License
132 stars 19 forks source link

What exactly is -use_fft doing ? #12

Open Mayukhdeb opened 3 years ago

Mayukhdeb commented 3 years ago

Hi @ProGamerGov, I've been digging around quite a lot lately to understand the significance of -use_fft. I'm trying to implement it myself on my own feature visualization library.

What I got to know from your README.md is that it enables Fast Fourier transform (FFT) decorrelation. After cloning your repo and adding in some print statements, I'm guessing that it is being used on a tensor that has the shape corresponding to the number of channels of the layer selected by the user.

But I'm yet to understand what it exactly does.

Any help is welcome :)

ProGamerGov commented 3 years ago

@Mayukhdeb So, neural-dream's FFT decorrelation doesn't actually do decorrelation. I mistakenly made it alter the frequencies instead.

My dream-creator project has fully functional decorrelation modules, and I would recommend referring to it regarding features. It also has improved versions of other neural-dream features as well.

I also explained what the decorrelation happening is and how it works here: https://github.com/ProGamerGov/dream-creator/issues/12

Let me know if you have any other question!

Mayukhdeb commented 3 years ago

@ProGamerGov Thank you so much for your help! I'll surely drop a message if I need some more help with this :)

I'm working on torch-dreams. It aims to be like lucid in terms of quality, but also super flexible and easier to use so that the community can use it on any model they want to