I have some tf.summary.scaler() in my keras model, but if I save the model and load it back, I can no longer see the tf summaries. Is this expected behavior?

I have some tf.summary.scaler() in my keras model, and I can see them logged with tensorboard callback. But if I save the model and load it back, I can no longer see the tf summaries. Is this expected behavior? Thx!

Hi @Xiao_Yang

Welcome to the TensorFlow Forum!

Yes, This is the expected behavior.

model.save() saves the model architecture and weights, not the logs by tf.summary.scaler(). TensorFlow summary are written to separate log files (using tf.summary.SummaryWriter()) during training and will not be saved by model.save(). You may need to create a new ```
tf.summary.create_file_writer() and add the tf.summary.scalar() again with the training loop after reloading the saved model to have new TF summaries. Thank you.