Giter VIP home page Giter VIP logo

Comments (6)

EndlessSora avatar EndlessSora commented on May 27, 2024 6

Thanks all for your interest and suggestions. We have supported PyTorch > 1.7.1 in this new commit. Please upgrade/reinstall the focal-frequency-loss package through pip or use the newest code in this repo.

Please close the issue if you find the problem is resolved. Thank you. :)

from focal-frequency-loss.

linyu0219 avatar linyu0219 commented on May 27, 2024 3

Is authors considering making a adaptation for high pytorch version like this :
photosynthesis-team/piq#253
Thanks,I don't familier with the fft, and want to use the great work in high pytorch version.

from focal-frequency-loss.

kjerk avatar kjerk commented on May 27, 2024 1

I was also looking into doing this transition myself, but like the other poster, am not familiar with the fft methods in Pytorch. In 1.8 the torch.fft methods were remove and torch.fft is now a full new module.

https://github.com/pytorch/pytorch/wiki/The-torch.fft-module-in-PyTorch-1.7

Most importantly: the backing code and tensors changed to be complex tensors, and so even if you replace the call to torch.rfft():

return torch.rfft(y, 2, onesided=False, normalized=True)

with something like

return torch.fft.fft(y, dim=2, norm='ortho')

Then later the calls to .max() fail:

if self.batch_matrix:
matrix_tmp = matrix_tmp / matrix_tmp.max()
else:
matrix_tmp = matrix_tmp / matrix_tmp.max(-1).values.max(-1).values[:, :, :, None, None]

from focal-frequency-loss.

linyu0219 avatar linyu0219 commented on May 27, 2024 1

@kjerk There is another unofficial implementation maybe you can refer to. https://github.com/HeonKK/Focal-Frequency-Loss/blob/main/util/ffl.py

from focal-frequency-loss.

ykk648 avatar ykk648 commented on May 27, 2024

thx

from focal-frequency-loss.

kjerk avatar kjerk commented on May 27, 2024

Thanks all for your interest and suggestions. We have supported PyTorch > 1.7.1 in this new commit. Please upgrade/reinstall the focal-frequency-loss package through pip or use the newest code in this repo.

Please close the issue if you find the problem is resolved. Thank you. :)

That's great news, thank you!

from focal-frequency-loss.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.