Browse Source

fix: model does not stop on stop_training == true

tags/v0.110.4-Transformer-Model
Asaf Agami GitHub 2 years ago
parent
commit
1142828855
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      src/TensorFlowNET.Keras/Engine/Model.Fit.cs

+ 12
- 0
src/TensorFlowNET.Keras/Engine/Model.Fit.cs View File

@@ -224,6 +224,10 @@ namespace Tensorflow.Keras.Engine

GC.Collect();
GC.WaitForPendingFinalizers();
if (stop_training)
{
break;
}
}

return callbacks.History;
@@ -283,6 +287,10 @@ namespace Tensorflow.Keras.Engine

GC.Collect();
GC.WaitForPendingFinalizers();
if (stop_training)
{
break;
}
}

return callbacks.History;
@@ -339,6 +347,10 @@ namespace Tensorflow.Keras.Engine

GC.Collect();
GC.WaitForPendingFinalizers();
if (stop_training)
{
break;
}
}

return callbacks.History;


Loading…
Cancel
Save