Browse Source

Suppress CS0108 (Member hides inherited member; missing new keyword)

tags/v0.20
Sam Harwell Haiping 5 years ago
parent
commit
044fe6d4fc
7 changed files with 16 additions and 0 deletions
  1. +2
    -0
      src/TensorFlowNET.Core/Keras/Engine/Model.cs
  2. +2
    -0
      src/TensorFlowNET.Core/Keras/Layers/Pooling2D.cs
  3. +2
    -0
      src/TensorFlowNET.Core/Operations/ControlFlows/CondContext.cs
  4. +2
    -0
      src/TensorFlowNET.Core/Operations/ControlFlows/WhileContext.cs
  5. +2
    -0
      src/TensorFlowNET.Core/Operations/Queues/PriorityQueue.cs
  6. +2
    -0
      src/TensorFlowNET.Core/Variables/ResourceVariable.cs
  7. +4
    -0
      src/TensorFlowNET.Keras/Layers/Core/Dense.cs

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

@@ -5,7 +5,9 @@ namespace Tensorflow.Keras.Engine
public class Model : Network public class Model : Network
{ {
bool _cloning; bool _cloning;
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
bool _is_compiled; bool _is_compiled;
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
string loss; string loss;
IOptimizer optimizer; IOptimizer optimizer;




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

@@ -26,7 +26,9 @@ namespace Tensorflow.Keras.Layers
private int[] strides; private int[] strides;
private string padding; private string padding;
private string data_format; private string data_format;
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
private InputSpec input_spec; private InputSpec input_spec;
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword


public Pooling2D(IPoolFunction pool_function, public Pooling2D(IPoolFunction pool_function,
int[] pool_size, int[] pool_size,


+ 2
- 0
src/TensorFlowNET.Core/Operations/ControlFlows/CondContext.cs View File

@@ -27,7 +27,9 @@ namespace Tensorflow.Operations
/// </summary> /// </summary>
public class CondContext : ControlFlowContext, IProtoBuf<CondContextDef, CondContext> public class CondContext : ControlFlowContext, IProtoBuf<CondContextDef, CondContext>
{ {
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
private Dictionary<string, Tensor> _external_values = new Dictionary<string, Tensor>(); private Dictionary<string, Tensor> _external_values = new Dictionary<string, Tensor>();
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword


/// <summary> /// <summary>
/// ///


+ 2
- 0
src/TensorFlowNET.Core/Operations/ControlFlows/WhileContext.cs View File

@@ -666,7 +666,9 @@ namespace Tensorflow.Operations
return ret; return ret;
} }


#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public object to_proto() public object to_proto()
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }


+ 2
- 0
src/TensorFlowNET.Core/Operations/Queues/PriorityQueue.cs View File

@@ -65,7 +65,9 @@ namespace Tensorflow.Queues
}); });
} }


#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public Tensor[] dequeue(string name = null) public Tensor[] dequeue(string name = null)
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{ {
Tensor[] ret; Tensor[] ret;
if (name == null) if (name == null)


+ 2
- 0
src/TensorFlowNET.Core/Variables/ResourceVariable.cs View File

@@ -30,7 +30,9 @@ namespace Tensorflow
{ {
Tensor _cached_value; Tensor _cached_value;
public string Device => handle.Device; public string Device => handle.Device;
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public Graph Graph => handle.graph; public Graph Graph => handle.graph;
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
public Operation op => handle.op; public Operation op => handle.op;
public Tensor is_initialized_op { get; set; } public Tensor is_initialized_op { get; set; }




+ 4
- 0
src/TensorFlowNET.Keras/Layers/Core/Dense.cs View File

@@ -28,7 +28,9 @@ namespace Keras.Layers
RefVariable W; RefVariable W;
int units; int units;
TensorShape WShape; TensorShape WShape;
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
string name; string name;
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
IActivation activation; IActivation activation;


public Dense(int units, string name = null, IActivation activation = null) public Dense(int units, string name = null, IActivation activation = null)
@@ -60,7 +62,9 @@ namespace Keras.Layers
{ {
return WShape; return WShape;
} }
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public TensorShape output_shape(TensorShape input_shape) public TensorShape output_shape(TensorShape input_shape)
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{ {
var output_shape = input_shape.dims; var output_shape = input_shape.dims;
output_shape[output_shape.Length - 1] = units; output_shape[output_shape.Length - 1] = units;


Loading…
Cancel
Save