Skip to content

Commit fff5029

Browse files
fix: revise earlystopping callback's min_delta parameter
1 parent 0fe91a4 commit fff5029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TensorFlowNET.Keras/Callbacks/Earlystopping.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Tensorflow.Keras.Callbacks;
1111
public class EarlyStopping: ICallback
1212
{
1313
int _paitence;
14-
int _min_delta;
14+
float _min_delta;
1515
int _verbose;
1616
int _stopped_epoch;
1717
int _wait;
@@ -26,7 +26,7 @@ public class EarlyStopping: ICallback
2626
CallbackParams _parameters;
2727
public Dictionary<string, List<float>>? history { get; set; }
2828
// user need to pass a CallbackParams to EarlyStopping, CallbackParams at least need the model
29-
public EarlyStopping(CallbackParams parameters,string monitor = "val_loss", int min_delta = 0, int patience = 0,
29+
public EarlyStopping(CallbackParams parameters,string monitor = "val_loss", float min_delta = 0f, int patience = 0,
3030
int verbose = 1, string mode = "auto", float baseline = 0f, bool restore_best_weights = false,
3131
int start_from_epoch = 0)
3232
{

0 commit comments

Comments
 (0)