Add a Stop_training propertytags/v0.100.5-BERT-load
@@ -79,5 +79,5 @@ public interface IModel : ILayer | |||||
IKerasConfig get_config(); | IKerasConfig get_config(); | ||||
void set_stopTraining_true(); | |||||
bool Stop_training { get;set; } | |||||
} | } |
@@ -95,7 +95,7 @@ public class EarlyStopping: ICallback | |||||
if (_wait >= _paitence && epoch > 0) | if (_wait >= _paitence && epoch > 0) | ||||
{ | { | ||||
_stopped_epoch = epoch; | _stopped_epoch = epoch; | ||||
_parameters.Model.set_stopTraining_true(); | |||||
_parameters.Model.Stop_training = true; | |||||
if (_restore_best_weights && _best_weights != null) | if (_restore_best_weights && _best_weights != null) | ||||
{ | { | ||||
if (_verbose > 0) | if (_verbose > 0) | ||||
@@ -39,6 +39,12 @@ namespace Tensorflow.Keras.Engine | |||||
set => optimizer = value; | set => optimizer = value; | ||||
} | } | ||||
public bool Stop_training | |||||
{ | |||||
get => stop_training; | |||||
set => stop_training = value; | |||||
} | |||||
public Model(ModelArgs args) | public Model(ModelArgs args) | ||||
: base(args) | : base(args) | ||||
{ | { | ||||
@@ -145,10 +151,5 @@ namespace Tensorflow.Keras.Engine | |||||
return children; | return children; | ||||
} | } | ||||
void IModel.set_stopTraining_true() | |||||
{ | |||||
stop_training = true; | |||||
} | |||||
} | } | ||||
} | } |