Giter Club home page Giter Club logo

Comments (3)

hahawhat-ch avatar hahawhat-ch commented on June 9, 2024

Hi,

First of all very nice paper and architechture! Ive been playing with the training code and trained a model with my own data. However after a couple of epochs im getting a Nan loss and after some debugning it seems like its the output of the model returns a nan tensor. I played a little bit with gradient clipping to see if it would help but it does not seem to be the case.

Best regards

Hi
Have you found a solution.I'm facing the same problem

from adabins.

shariqfarooq123 avatar shariqfarooq123 commented on June 9, 2024

One reason might be that at some point loss has a 'nan' value. What is the minimum depth you are using?
The code uses SILog and if your depth has zeroes (or negative) this will lead to nan values.

If that's the case, you can:

  1. Clip (from below) your depth values to some minimum positive value (like 1e-3).
  2. You can change the loss in line 19 in loss.py (
    g = torch.log(input) - torch.log(target)
    )
    to :
alpha = 1e-3
g = torch.log(alpha + input) - torch.log(alpha + target)

Let me know if this solves the issues.

from adabins.

hahawhat-ch avatar hahawhat-ch commented on June 9, 2024

from adabins.

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.