diff --git a/src/TensorFlowNET.Core/Functions/Function.cs b/src/TensorFlowNET.Core/Functions/Function.cs index 81e3567a..d57097ae 100644 --- a/src/TensorFlowNET.Core/Functions/Function.cs +++ b/src/TensorFlowNET.Core/Functions/Function.cs @@ -4,7 +4,9 @@ namespace Tensorflow { public class Function { +#pragma warning disable CS0169 // The field 'Function._handle' is never used private IntPtr _handle; +#pragma warning restore CS0169 // The field 'Function._handle' is never used public Function() { diff --git a/src/TensorFlowNET.Core/Keras/Engine/Model.cs b/src/TensorFlowNET.Core/Keras/Engine/Model.cs index 4b1060f1..fa168eb0 100644 --- a/src/TensorFlowNET.Core/Keras/Engine/Model.cs +++ b/src/TensorFlowNET.Core/Keras/Engine/Model.cs @@ -4,7 +4,9 @@ namespace Tensorflow.Keras.Engine { public class Model : Network { +#pragma warning disable CS0169 // The field 'Model._cloning' is never used bool _cloning; +#pragma warning restore CS0169 // The field 'Model._cloning' is never used #pragma warning disable CS0108 // Member hides inherited member; missing new keyword bool _is_compiled; #pragma warning restore CS0108 // Member hides inherited member; missing new keyword diff --git a/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs b/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs index 819c62e7..3ab76832 100644 --- a/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs +++ b/src/TensorFlowNET.Core/Keras/Engine/Sequential.cs @@ -21,7 +21,9 @@ namespace Tensorflow.Keras.Engine public class Sequential : Model, ITensorFlowObject { bool _is_graph_network; +#pragma warning disable CS0169 // The field 'Sequential.outputs' is never used Tensor[] outputs; +#pragma warning restore CS0169 // The field 'Sequential.outputs' is never used public Sequential(string name = null) : base(name: name) diff --git a/src/TensorFlowNET.Core/Keras/Layers/Layer.cs b/src/TensorFlowNET.Core/Keras/Layers/Layer.cs index fff338d1..789ffee1 100644 --- a/src/TensorFlowNET.Core/Keras/Layers/Layer.cs +++ b/src/TensorFlowNET.Core/Keras/Layers/Layer.cs @@ -66,7 +66,9 @@ namespace Tensorflow.Keras.Layers private List _outbound_nodes; public List outbound_nodes => _outbound_nodes; +#pragma warning disable CS0169 // The field 'Layer._initial_weights' is never used float _initial_weights; +#pragma warning restore CS0169 // The field 'Layer._initial_weights' is never used public Layer(bool trainable = true, string name = null, diff --git a/src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs b/src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs index e33e42a4..0f918410 100644 --- a/src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs +++ b/src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs @@ -10,7 +10,9 @@ namespace Tensorflow.Keras.Optimizers { protected override string _name => "SGD"; +#pragma warning disable CS0169 // The field 'SGD.nesterov' is never used bool nesterov; +#pragma warning restore CS0169 // The field 'SGD.nesterov' is never used public SGD(float learning_rate, float momentum = 0.0f, diff --git a/src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs b/src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs index 60940247..5e0edad5 100644 --- a/src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs +++ b/src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs @@ -61,8 +61,12 @@ namespace Tensorflow { private StringOrFunction _device_name_or_function; private string display_name; +#pragma warning disable CS0169 // The field '_UserDeviceSpec.function' is never used private FunctionDef function; +#pragma warning restore CS0169 // The field '_UserDeviceSpec.function' is never used +#pragma warning disable CS0169 // The field '_UserDeviceSpec.raw_string' is never used private string raw_string; +#pragma warning restore CS0169 // The field '_UserDeviceSpec.raw_string' is never used public _UserDeviceSpec(StringOrFunction device_name_or_function) {