Skip to content

Commit ee3d849

Browse files
sharwellOceania2018
authored andcommitted
Suppress CS0169 (The field 'name' is never used)
1 parent e268b89 commit ee3d849

6 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/TensorFlowNET.Core/Functions/Function.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ namespace Tensorflow
44
{
55
public class Function
66
{
7+
#pragma warning disable CS0169 // The field 'Function._handle' is never used
78
private IntPtr _handle;
9+
#pragma warning restore CS0169 // The field 'Function._handle' is never used
810

911
public Function()
1012
{

src/TensorFlowNET.Core/Keras/Engine/Model.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ namespace Tensorflow.Keras.Engine
44
{
55
public class Model : Network
66
{
7+
#pragma warning disable CS0169 // The field 'Model._cloning' is never used
78
bool _cloning;
9+
#pragma warning restore CS0169 // The field 'Model._cloning' is never used
810
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
911
bool _is_compiled;
1012
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword

src/TensorFlowNET.Core/Keras/Engine/Sequential.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ namespace Tensorflow.Keras.Engine
2121
public class Sequential : Model, ITensorFlowObject
2222
{
2323
bool _is_graph_network;
24+
#pragma warning disable CS0169 // The field 'Sequential.outputs' is never used
2425
Tensor[] outputs;
26+
#pragma warning restore CS0169 // The field 'Sequential.outputs' is never used
2527

2628
public Sequential(string name = null)
2729
: base(name: name)

src/TensorFlowNET.Core/Keras/Layers/Layer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public class Layer : AutoTrackable
6666
private List<Node> _outbound_nodes;
6767
public List<Node> outbound_nodes => _outbound_nodes;
6868

69+
#pragma warning disable CS0169 // The field 'Layer._initial_weights' is never used
6970
float _initial_weights;
71+
#pragma warning restore CS0169 // The field 'Layer._initial_weights' is never used
7072

7173
public Layer(bool trainable = true,
7274
string name = null,

src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ public class SGD : OptimizerV2
1010
{
1111
protected override string _name => "SGD";
1212

13+
#pragma warning disable CS0169 // The field 'SGD.nesterov' is never used
1314
bool nesterov;
15+
#pragma warning restore CS0169 // The field 'SGD.nesterov' is never used
1416

1517
public SGD(float learning_rate,
1618
float momentum = 0.0f,

src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ public class _UserDeviceSpec
6161
{
6262
private StringOrFunction _device_name_or_function;
6363
private string display_name;
64+
#pragma warning disable CS0169 // The field '_UserDeviceSpec.function' is never used
6465
private FunctionDef function;
66+
#pragma warning restore CS0169 // The field '_UserDeviceSpec.function' is never used
67+
#pragma warning disable CS0169 // The field '_UserDeviceSpec.raw_string' is never used
6568
private string raw_string;
69+
#pragma warning restore CS0169 // The field '_UserDeviceSpec.raw_string' is never used
6670

6771
public _UserDeviceSpec(StringOrFunction device_name_or_function)
6872
{

0 commit comments

Comments
 (0)