Comments (6)
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.
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.
We could make the colors customizable via constructor arguments to
Progbar
, but that customization wouldn't be available directly viafit()
(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.
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.
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.
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)
- Recommendation for writing tests for ModelParallel distribution HOT 2
- optimizers.Adam no longer accepts tf.Variable HOT 1
- Please explain label_mode='int' in keras.utils.image_dataset_from_directory HOT 2
- Getting Nan values in prediction HOT 1
- compatibility with pytorch 2.3 HOT 1
- Specifying shape of normal sampling with partially empty keras tensor HOT 3
- Question: Best practice for direct variable initialization HOT 5
- Inconsistent assertion in keras.layers.MultiHeadAttention
- [BUG] keras.layers.StringLookup and Vocabulary of Tensors HOT 3
- model.export() fails to save output layer name in the SavedModel HOT 9
- ops.linspace broken in Tensorflow when num is a tf.Tensor HOT 4
- Loading model fails: can only concatenate tuple
- model.predict time stdout HOT 4
- Keras `__init__.py` structure isn't readable by a static type checker HOT 5
- [BUG] Conflicting loss_weights implementation in Keras3 for single output case. HOT 2
- Most of the outbound links are broken in Tensorflow documentation HOT 1
- [Question] When is it absolutely necessary to use a `Lambda` layer? HOT 1
- TimeDistributed layer with nested model no longer working in TensorFlow 2.16.1
- model.keras format much slower to load HOT 8
- TokenAndPositionEmbedding layer warning---Respecting padding mask or destroying it?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras.