TensorFlow.NET icon indicating copy to clipboard operation
TensorFlow.NET copied to clipboard

How should I save the loss value during training? model.fit has no return value

Open Z-shuaishuai opened this issue 4 years ago • 4 comments

How should I save the loss value during training? model.fit has no return value

Z-shuaishuai avatar Apr 04 '22 09:04 Z-shuaishuai

I think you need to use Tensorflow.Keras.Engine.Sequential instead of model, and then use predict, calculate loss from the result of predict, calculate new gradients with Tensorflow.Gradients.GradientTape, and finally use your keras.optamizers.[chosen optimizer].apply_gradients().

However, I am less than sure about this. I hope Haiping can answer this - possibly correcting my answer.

Darlanio avatar Dec 31 '22 01:12 Darlanio

model.fit returns History for next release v0.100.2. image

image

Oceania2018 avatar Jan 31 '23 02:01 Oceania2018

When will the new version(v0.100.2) be available on Nuget ? @Oceania2018

ammar-albush avatar Jan 31 '23 20:01 ammar-albush

My guess, it will take at least a few days, probably a few weeks: There are many small bugs to fix at present (927, 928... 973...)

Darlanio avatar Jan 31 '23 20:01 Darlanio