diff --git a/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs b/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs index 3ab76832..c6fcd68b 100644 --- a/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs +++ b/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs @@ -20,7 +20,9 @@ namespace Tensorflow.Keras.Engine { public class Sequential : Model, ITensorFlowObject { +#pragma warning disable CS0649 // Field 'Sequential._is_graph_network' is never assigned to, and will always have its default value false bool _is_graph_network; +#pragma warning restore CS0649 // Field 'Sequential._is_graph_network' is never assigned to, and will always have its default value false #pragma warning disable CS0169 // The field 'Sequential.outputs' is never used Tensor[] outputs; #pragma warning restore CS0169 // The field 'Sequential.outputs' is never used diff --git a/src/TensorFlowNET.Core/Keras/Layers/Layer.cs b/src/TensorFlowNET.Core/Keras/Layers/Layer.cs index 789ffee1..5118cb71 100644 --- a/src/TensorFlowNET.Core/Keras/Layers/Layer.cs +++ b/src/TensorFlowNET.Core/Keras/Layers/Layer.cs @@ -63,7 +63,9 @@ namespace Tensorflow.Keras.Layers private List _inbound_nodes; public List inbound_nodes => _inbound_nodes; +#pragma warning disable CS0649 // Field 'Layer._outbound_nodes' is never assigned to, and will always have its default value null private List _outbound_nodes; +#pragma warning restore CS0649 // Field 'Layer._outbound_nodes' is never assigned to, and will always have its default value null public List outbound_nodes => _outbound_nodes; #pragma warning disable CS0169 // The field 'Layer._initial_weights' is never used diff --git a/src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs b/src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs index 59333c84..bd082214 100644 --- a/src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs +++ b/src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs @@ -18,10 +18,18 @@ namespace Tensorflow.Operations.Initializers { public class RandomUniform : IInitializer { +#pragma warning disable CS0649 // Field 'RandomUniform.seed' is never assigned to, and will always have its default value private int? seed; +#pragma warning restore CS0649 // Field 'RandomUniform.seed' is never assigned to, and will always have its default value +#pragma warning disable CS0649 // Field 'RandomUniform.minval' is never assigned to, and will always have its default value 0 private float minval; +#pragma warning restore CS0649 // Field 'RandomUniform.minval' is never assigned to, and will always have its default value 0 +#pragma warning disable CS0649 // Field 'RandomUniform.maxval' is never assigned to, and will always have its default value 0 private float maxval; +#pragma warning restore CS0649 // Field 'RandomUniform.maxval' is never assigned to, and will always have its default value 0 +#pragma warning disable CS0649 // Field 'RandomUniform.dtype' is never assigned to, and will always have its default value private TF_DataType dtype; +#pragma warning restore CS0649 // Field 'RandomUniform.dtype' is never assigned to, and will always have its default value public RandomUniform() { diff --git a/src/TensorFlowNET.Core/Training/Saving/Saver.cs b/src/TensorFlowNET.Core/Training/Saving/Saver.cs index d8de44fb..d24fc5b9 100644 --- a/src/TensorFlowNET.Core/Training/Saving/Saver.cs +++ b/src/TensorFlowNET.Core/Training/Saving/Saver.cs @@ -42,7 +42,9 @@ namespace Tensorflow private bool _is_built; private SaverDef.Types.CheckpointFormatVersion _write_version; private bool _pad_step_number; +#pragma warning disable CS0649 // Field 'Saver._filename' is never assigned to, and will always have its default value null private string _filename; +#pragma warning restore CS0649 // Field 'Saver._filename' is never assigned to, and will always have its default value null private bool _is_empty; private float _next_checkpoint_time; private bool _save_relative_paths;