Giter Club home page Giter Club logo

Comments (3)

stared avatar stared commented on July 25, 2024 1

I see. Apparently I would need to loop through output names, in addition to losses (though: are many losses a typical thing?).

To do the whole thing - https://github.com/keras-team/keras/blob/master/keras/engine/training.py is a bit convolved.

If you want to give it a try, you are welcome (feel free to change this piece of code a lot - as I said, didn't test it so don't be afraid of a complete rewrite of this part).

from livelossplot.

stared avatar stared commented on July 25, 2024

@jonahweissman I admit I didn't test livelossplot with multiple losses. I wrote based on my understanding on how does Keras deal with multiple losses.

Could you show me the line with model.compile and the result of model.loss, model.output_names (and possibly, what is in logs)?

from livelossplot.

jonahweissman avatar jonahweissman commented on July 25, 2024

Here's my line with model.compile (I'm using the functional API):

model = Model(inputs=[weather_layers[0], day_layers[0], date_layers[0]], outputs=[usage_out,clients_out,sessions_out])
model.compile(loss='mean_absolute_percentage_error',
              optimizer=Adam(0.0001))
In [1]: model.loss
Out[1]: 'mean_absolute_percentage_error'

In [2]: model.output_names
Out[2]: ['usage', 'clients', 'sessions']

In [3]: model.losses
Out[3]: []

I didn't specify loss functions for each output, so I believe it uses model.loss for each.

from livelossplot.

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.