Commit ac07be92 authored by GBODJO Yawogan Jean Eudes's avatar GBODJO Yawogan Jean Eudes
Browse files

fix the reset bug

parent d6f810a2
......@@ -18,11 +18,12 @@ def train_info (model,checkpoint_path,epoch,train_loss,train_acc,valid_loss,vali
print (f'{valid_acc.name} improved from {best_acc} to {valid_acc.result()}, saving to {checkpoint_path}')
best_acc = valid_acc.result()
# Reset metrics for the next epoch
train_loss.reset_states()
train_acc.reset_states()
valid_loss.reset_states()
valid_acc.reset_states()
# Reset metrics for the next epoch
train_loss.reset_states()
train_acc.reset_states()
valid_loss.reset_states()
valid_acc.reset_states()
return best_acc
@tf.function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment