Browse Source

Suppress CS0649 (Field 'name' is never assigned to, and will always have its default value)

tags/v0.20
Sam Harwell Haiping 5 years ago
parent
commit
c48cce4e7d
4 changed files with 14 additions and 0 deletions
  1. +2
    -0
      src/TensorFlowNET.Core/Keras/Engine/Sequential.cs
  2. +2
    -0
      src/TensorFlowNET.Core/Keras/Layers/Layer.cs
  3. +8
    -0
      src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs
  4. +2
    -0
      src/TensorFlowNET.Core/Training/Saving/Saver.cs

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

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


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

@@ -63,7 +63,9 @@ namespace Tensorflow.Keras.Layers
private List<Node> _inbound_nodes;
public List<Node> 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<Node> _outbound_nodes;
#pragma warning restore CS0649 // Field 'Layer._outbound_nodes' is never assigned to, and will always have its default value null
public List<Node> outbound_nodes => _outbound_nodes;

#pragma warning disable CS0169 // The field 'Layer._initial_weights' is never used


+ 8
- 0
src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs View File

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


+ 2
- 0
src/TensorFlowNET.Core/Training/Saving/Saver.cs View File

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


Loading…
Cancel
Save