Closed saskra closed 2 years ago
Hey;
Why are two epochs run through as desired, but after the initially correct specification (namely "max_epochs=2"), "max_epochs=1" is then output several times?
So this happens as we do "one epoch" for each validation dataset at the end of each training epoch. This code also computes the validation metrics on the training set as well to make it easier to see if its overfitting.
What does the time information "Time taken: 00:00:09" refer to, because the real runtime is significantly longer?
This is why you're seeing different times for completion as well, when its referring to the shorter times its how long it takes for an "epoch" on the validation sets.
The outputs in the training starting with "INFO:root:" are apparently defined in semantic_segmentation/engines.py, but where do the others ("INFO:ignite.engine.engine:") come from?
These other logging statements come from within ignite
So this happens as we do "one epoch" for each validation dataset at the end of each training epoch. This code also computes the validation metrics on the training set as well to make it easier to see if its overfitting. This is why you're seeing different times for completion as well, when its referring to the shorter times its how long it takes for an "epoch" on the validation sets.
Thank you for the explanation! So in each epoch the first row of metrics refers to the training dataset and the second to the validation dataset? You could add that in the output to make it more understandable. Isn't it unusual that the result on the validation dataset is better than on the training dataset?
These other logging statements come from within
ignite
Can I suppress these outputs somehow, during longer trainings they just clutter up the terminal window?
You could add that in the output to make it more understandable.
It definitely should be; it'll be a fairly simple change here if you want to make a PR? https://github.com/WillBrennan/SemanticSegmentation/blob/master/semantic_segmentation/engines.py#L60
Can I suppress these outputs somehow, during longer trainings they just clutter up the terminal window?
Yes; they can be suppressed. Currently this library is using the default logger from the python standard logging library. We should specify a separate logger for this library.
Isn't it unusual that the result on the validation dataset is better than on the training dataset? Ah to clarify; when the metrics are calculated on the training dataset it is still performing augmentation. This is why the validation dataset performs better.
It definitely should be; it'll be a fairly simple change here if you want to make a PR? https://github.com/WillBrennan/SemanticSegmentation/blob/master/semantic_segmentation/engines.py#L60
Here it is: https://github.com/WillBrennan/SemanticSegmentation/pull/29
Ah to clarify; when the metrics are calculated on the training dataset it is still performing augmentation. This is why the validation dataset performs better.
Ah, now it makes sense! :-)
Can anyone help me understand the terminal output during training? I followed these steps: https://github.com/WillBrennan/SemanticSegmentation#training-new-projects I only adjusted minor things.
My output looks like this (with some truncation, line breaks and indentation on my part for clarity):
Here's what I'd like to know about it:
Possibly part of my questions come from the fact that I had only used Tensorflow and not Torch before. I thank you in advance if someone can make me understand at least part of these oddities.