@@ -17,7 +17,7 @@ namespace Tensorflow.Keras | |||||
List<IVariableV1> TrainableVariables { get; } | List<IVariableV1> TrainableVariables { get; } | ||||
List<IVariableV1> TrainableWeights { get; } | List<IVariableV1> TrainableWeights { get; } | ||||
List<IVariableV1> NonTrainableWeights { get; } | List<IVariableV1> NonTrainableWeights { get; } | ||||
List<IVariableV1> Weights { get; set} | |||||
List<IVariableV1> Weights { get; set; } | |||||
Shape OutputShape { get; } | Shape OutputShape { get; } | ||||
Shape BatchInputShape { get; } | Shape BatchInputShape { get; } | ||||
TensorShapeConfig BuildInputShape { get; } | TensorShapeConfig BuildInputShape { get; } | ||||
@@ -84,6 +84,8 @@ namespace Tensorflow | |||||
protected bool built = false; | protected bool built = false; | ||||
public bool Built => built; | public bool Built => built; | ||||
List<IVariableV1> ILayer.Weights { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } | |||||
public RnnCell(bool trainable = true, | public RnnCell(bool trainable = true, | ||||
string name = null, | string name = null, | ||||
TF_DataType dtype = TF_DataType.DtInvalid, | TF_DataType dtype = TF_DataType.DtInvalid, | ||||
@@ -102,8 +102,8 @@ public class EarlyStopping: ICallback | |||||
{ | { | ||||
Console.WriteLine($"Restoring model weights from the end of the best epoch: {_best_epoch + 1}"); | Console.WriteLine($"Restoring model weights from the end of the best epoch: {_best_epoch + 1}"); | ||||
} | } | ||||
_parameters.Model.Weights = _best_weights; | |||||
} | } | ||||
_parameters.Model.Weights = _best_weights; | |||||
} | } | ||||
} | } | ||||
public void on_train_end() | public void on_train_end() | ||||