Skip to content

Commit c48cce4

Browse files
sharwellOceania2018
authored andcommitted
Suppress CS0649 (Field 'name' is never assigned to, and will always have its default value)
1 parent 0da5c35 commit c48cce4

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ namespace Tensorflow.Keras.Engine
2020
{
2121
public class Sequential : Model, ITensorFlowObject
2222
{
23+
#pragma warning disable CS0649 // Field 'Sequential._is_graph_network' is never assigned to, and will always have its default value false
2324
bool _is_graph_network;
25+
#pragma warning restore CS0649 // Field 'Sequential._is_graph_network' is never assigned to, and will always have its default value false
2426
#pragma warning disable CS0169 // The field 'Sequential.outputs' is never used
2527
Tensor[] outputs;
2628
#pragma warning restore CS0169 // The field 'Sequential.outputs' is never used

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public class Layer : AutoTrackable
6363
private List<Node> _inbound_nodes;
6464
public List<Node> inbound_nodes => _inbound_nodes;
6565

66+
#pragma warning disable CS0649 // Field 'Layer._outbound_nodes' is never assigned to, and will always have its default value null
6667
private List<Node> _outbound_nodes;
68+
#pragma warning restore CS0649 // Field 'Layer._outbound_nodes' is never assigned to, and will always have its default value null
6769
public List<Node> outbound_nodes => _outbound_nodes;
6870

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

src/TensorFlowNET.Core/Operations/Initializers/RandomUniform.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ namespace Tensorflow.Operations.Initializers
1818
{
1919
public class RandomUniform : IInitializer
2020
{
21+
#pragma warning disable CS0649 // Field 'RandomUniform.seed' is never assigned to, and will always have its default value
2122
private int? seed;
23+
#pragma warning restore CS0649 // Field 'RandomUniform.seed' is never assigned to, and will always have its default value
24+
#pragma warning disable CS0649 // Field 'RandomUniform.minval' is never assigned to, and will always have its default value 0
2225
private float minval;
26+
#pragma warning restore CS0649 // Field 'RandomUniform.minval' is never assigned to, and will always have its default value 0
27+
#pragma warning disable CS0649 // Field 'RandomUniform.maxval' is never assigned to, and will always have its default value 0
2328
private float maxval;
29+
#pragma warning restore CS0649 // Field 'RandomUniform.maxval' is never assigned to, and will always have its default value 0
30+
#pragma warning disable CS0649 // Field 'RandomUniform.dtype' is never assigned to, and will always have its default value
2431
private TF_DataType dtype;
32+
#pragma warning restore CS0649 // Field 'RandomUniform.dtype' is never assigned to, and will always have its default value
2533

2634
public RandomUniform()
2735
{

src/TensorFlowNET.Core/Training/Saving/Saver.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public class Saver
4242
private bool _is_built;
4343
private SaverDef.Types.CheckpointFormatVersion _write_version;
4444
private bool _pad_step_number;
45+
#pragma warning disable CS0649 // Field 'Saver._filename' is never assigned to, and will always have its default value null
4546
private string _filename;
47+
#pragma warning restore CS0649 // Field 'Saver._filename' is never assigned to, and will always have its default value null
4648
private bool _is_empty;
4749
private float _next_checkpoint_time;
4850
private bool _save_relative_paths;

0 commit comments

Comments
 (0)