Coder Social home page Coder Social logo

Comments (6)

SuryanarayanaY avatar SuryanarayanaY commented on June 9, 2024

Hi @stellarpower ,

This is more like user experience related.IMO this is hardcoded to just keep it simple.

If you want to propose some user controls please feel free to raise a PR. Keras team may review and take appropriate action. Thanks!

from keras.

fchollet avatar fchollet commented on June 9, 2024

We could make the colors customizable via constructor arguments to Progbar, but that customization wouldn't be available directly via fit() (You'd have to pass your own progress bar callback).

from keras.

briango28 avatar briango28 commented on June 9, 2024

We could make the colors customizable via constructor arguments to Progbar, but that customization wouldn't be available directly via fit() (You'd have to pass your own progress bar callback).

Squeezing all those extra arguments into fit() would be rather unwieldy I think. I'm of the opinion that anybody interested in a custom Progbar would (or at least should) be perfectly happy with passing in an explicit Progbar instance.

from keras.

stellarpower avatar stellarpower commented on June 9, 2024

Squeezing all those extra arguments into fit() would be rather unwieldy

Yeah, I'd totally agree with that, squashing in loads of arguments over and over is something I really don't like when working with Python code - I wasn't aware I could pass my own to fit.

For now what I have done is changed the callback to set the colour depending on whether we're training, validating, or inferring. For my model, I need to plot my data to make any sense of it, so I originally wanted this feature for myself because I could rapidly get confused when scrolling back in the terminal, as with weights and biases thrown in and checks to see if the model has given up on life and just plotted a straight line I have quite a lot of callbacks.

But I think it's always good to make things modular and buy not build. Is there a particular motivation for including a custom one within Keras, rather than using an existing package (e.g. tqdm is one I have seen come up)? Or just to avoid extra dependencies? Googling, I see a number of torch users lament about not having a similar bar before Keras 3, so I would see a motivation for merging parts of this into a more general package and hen just using it within Keras.

Also, tangential, but on the topic of the progress bar, I see the callbacks are ordered in such a way that the progress bar is at the end of the list. This messes up my terminal when another callback prints something at the end of the epoch, so I changed it such that the progress bar update is always the first in the list. Is there also a reason it ought to be at the end I haven't thought of? It makes conceptual sense in that the epoch isn't complete until all of the callbacks have run, but I wonder how many others have a similar situation to mine, in which the console gets garbled if they need to log anything during their own callbacks.

Cheers

from keras.

fchollet avatar fchollet commented on June 9, 2024

The reason for having the progress bar at the end is that it prints metrics logs, and metrics can be added by other callbacks. If it were the first callback, it might ignore a bunch of data inserted into the logs dict by other callbacks.

If you pass your own custom progress bar, you can have callbacks in any order you want.

from keras.

stellarpower avatar stellarpower commented on June 9, 2024

Right, gotcha. Are these the ones on the right of the bar? I get something like a dictionary printed below the bar each epoch, but I think it may be a callback adding that. Maybe I should use a more sophisticated logging setup.

from keras.

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.