Yann-CV / vintage-models

Pytorch personal implementation of the most famous neural network models
GNU General Public License v3.0
0 stars 0 forks source link

The model checkpoint is always saved with accuracy = 0.00 for generation models #16

Open Yann-CV opened 5 months ago

Yann-CV commented 5 months ago

For VAE, the filename of the model checkpoint is containing accuracy which is always 0.00 vae-mnist-epoch=30-accuracy=0.00.ckpt

dosubot[bot] commented 5 months ago

To resolve the issue where the model checkpoint for your VAE is always saved with an accuracy of 0.00 in the filename, you need to ensure that the metric you are monitoring (in this case, "accuracy") is being logged correctly during training. However, in the provided code, the monitored metric is "training_loss" and not "accuracy".

To fix this, you should either change the filename to reflect the monitored metric "training_loss" or ensure that "accuracy" is being logged and monitored correctly. Here is how you can adjust the filename to use "training_loss":

CHECKPOINT_CALLBACK = ModelCheckpoint(
    save_top_k=1,
    monitor="training_loss",
    mode="min",
    dirpath="/storage/ml/models",
    filename="vae-mnist-{epoch:02d}-{training_loss:.2f}",
)

This change will ensure that the filename reflects the "training_loss" metric, which is being monitored [1].

#### Details **About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.