Giter Site home page Giter Site logo

FID is nan about biggan-pytorch HOT 4 OPEN

ajbrock avatar ajbrock commented on May 28, 2024
FID is nan

from biggan-pytorch.

Comments (4)

damlasena avatar damlasena commented on May 28, 2024 8

Hi @doantientai, the FID value is a sort of difference between two Gaussians and comes from Frechet Distance computation. The reason for NaN FID value could be small number of samples (<2048). You can see two different frechet distance computation methods in inception_utils.py . As default it uses the 'torch' method. So try the 'numpy' method instead of 'torch'. I hope it works.

from biggan-pytorch.

doantientai avatar doantientai commented on May 28, 2024 5

Thank you @damlasena, I switched to numpy method and it works. I also think that the line 306 in inception_utils.py should be:
FID = numpy_calculate_frechet_distance(mu, sigma, data_mu, data_sigma)
instead of:
FID = numpy_calculate_frechet_distance(mu.cpu().numpy(), sigma.cpu().numpy(), data_mu, data_sigma)
because in the line 299, mu and sigma are already converted to numpy arrays

from biggan-pytorch.

LonglongaaaGo avatar LonglongaaaGo commented on May 28, 2024

Hi, @doantientai @damlasena. Is there anyone who finds that numpy_calculate_frechet_distance will cost a lot of time? For example, when I want to vilify the model performance, it cost me almost 1 day or more to calculate the metric. I don't know why I cost so much time! So, someone who can help me fix this problem? Thanks!

from biggan-pytorch.

LonglongaaaGo avatar LonglongaaaGo commented on May 28, 2024

BTW, I use the V100 32GB device with 8 CPUs

from biggan-pytorch.

Related Issues (20)

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.