Code Monkey home page Code Monkey logo

Comments (4)

lisurui6 avatar lisurui6 commented on July 21, 2024

How long do I have to wait to see NaN error occur?

from 4dsurvival.

lisurui6 avatar lisurui6 commented on July 21, 2024

I would need more information. Does the loss in step 2a become NaN at some point? What iteration?

from 4dsurvival.

lisurui6 avatar lisurui6 commented on July 21, 2024

A few points to note down:

  1. I don't think such extensive search of hyperparameters is useful in practice, and without it would surely make it more efficient to execute the code. I think once they are found in step 1a, the hyperparameters can be used in the bootstrap sampling steps. Things like drop out rate, number of hidden units, is not that sensitive. Learning rate isn't sensitive as well, if Adam optimiser is used. So there is little point in repeating the search.
  2. Most likely the NaN is from exploding gradients. Adding batch norm layers definitively is recommended, and will solve this issue. Notice to add them after linear layer before nonlinear activation (and of course not in the output layer).
  3. The repo uses keras==2.2.2 and tf1. Highly recommended to upgrade to tf2 at least. Most recommended to switch to pytorch. It will be much easier to debug.

from 4dsurvival.

doregan avatar doregan commented on July 21, 2024

Lifelines function had a bugfix in April 2019 as it had been silently converting NaNs in the event vector to True. In the current version these now produce an error - which we are picking up when we ran the code. Reducing dropout search range to [0.1,0.5] allows code to run with lifelines v 0.23.9 and achieves similar discrimination performance.
image (8)

from 4dsurvival.

Related Issues (4)

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.