Browse Source

Suppress CS0169 (The field 'name' is never used)

tags/v0.20
Sam Harwell Haiping 5 years ago
parent
commit
ee3d8495b0
6 changed files with 14 additions and 0 deletions
  1. +2
    -0
      src/TensorFlowNET.Core/Functions/Function.cs
  2. +2
    -0
      src/TensorFlowNET.Core/Keras/Engine/Model.cs
  3. +2
    -0
      src/TensorFlowNET.Core/Keras/Engine/Sequential.cs
  4. +2
    -0
      src/TensorFlowNET.Core/Keras/Layers/Layer.cs
  5. +2
    -0
      src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs
  6. +4
    -0
      src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs

+ 2
- 0
src/TensorFlowNET.Core/Functions/Function.cs View File

@@ -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()
{


+ 2
- 0
src/TensorFlowNET.Core/Keras/Engine/Model.cs View File

@@ -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


+ 2
- 0
src/TensorFlowNET.Core/Keras/Engine/Sequential.cs View File

@@ -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)


+ 2
- 0
src/TensorFlowNET.Core/Keras/Layers/Layer.cs View File

@@ -66,7 +66,9 @@ namespace Tensorflow.Keras.Layers
private List<Node> _outbound_nodes;
public List<Node> 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,


+ 2
- 0
src/TensorFlowNET.Core/Keras/Optimizers/SGD.cs View File

@@ -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,


+ 4
- 0
src/TensorFlowNET.Core/Operations/_UserDeviceSpec.cs View File

@@ -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)
{


Loading…
Cancel
Save