| @@ -269,16 +269,22 @@ namespace Tensorflow.Eager | |||||
| if(attr_value == null) | if(attr_value == null) | ||||
| { | { | ||||
| if (is_list != 0) | if (is_list != 0) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| //SetOpAttrListDefault | //SetOpAttrListDefault | ||||
| else | else | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| //SetOpAttrScalarDefault | //SetOpAttrScalarDefault | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if (is_list != 0) | if (is_list != 0) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ;// SetOpAttrList | ;// SetOpAttrList | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| else | else | ||||
| SetOpAttrScalar(ctx, op, attr_name, attr_value, type, attr_list_sizes, status); | SetOpAttrScalar(ctx, op, attr_name, attr_value, type, attr_list_sizes, status); | ||||
| } | } | ||||
| @@ -350,7 +350,9 @@ namespace Tensorflow | |||||
| if (attr_def.Type.StartsWith("list(")) | if (attr_def.Type.StartsWith("list(")) | ||||
| { | { | ||||
| if (attr_def.HasMinimum) | if (attr_def.HasMinimum) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| attr_value.List = new AttrValue.Types.ListValue(); | attr_value.List = new AttrValue.Types.ListValue(); | ||||
| } | } | ||||
| @@ -71,9 +71,13 @@ namespace Tensorflow | |||||
| return np.frombuffer(tensor.TensorContent.ToByteArray(), tensor_dtype).reshape(shape); | return np.frombuffer(tensor.TensorContent.ToByteArray(), tensor_dtype).reshape(shape); | ||||
| } | } | ||||
| else if (tensor.Dtype == DataType.DtHalf || tensor.Dtype == DataType.DtBfloat16) | else if (tensor.Dtype == DataType.DtHalf || tensor.Dtype == DataType.DtBfloat16) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| else if (tensor.Dtype == DataType.DtFloat) | else if (tensor.Dtype == DataType.DtFloat) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| else if (new DataType[] { DataType.DtInt32, DataType.DtUint8 }.Contains(tensor.Dtype)) | else if (new DataType[] { DataType.DtInt32, DataType.DtUint8 }.Contains(tensor.Dtype)) | ||||
| { | { | ||||
| if (tensor.IntVal.Count == 1) | if (tensor.IntVal.Count == 1) | ||||
| @@ -241,7 +241,9 @@ namespace Tensorflow | |||||
| Console.WriteLine($"Restoring parameters from {save_path}"); | Console.WriteLine($"Restoring parameters from {save_path}"); | ||||
| if (tf.context.executing_eagerly()) | if (tf.context.executing_eagerly()) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| else | else | ||||
| sess.run(_saver_def.RestoreOpName, | sess.run(_saver_def.RestoreOpName, | ||||
| new FeedItem(_saver_def.FilenameTensorName, save_path)); | new FeedItem(_saver_def.FilenameTensorName, save_path)); | ||||
| @@ -43,7 +43,9 @@ namespace Tensorflow.Train | |||||
| IInitializer checkpoint_initializer = null; | IInitializer checkpoint_initializer = null; | ||||
| #pragma warning restore CS0219 // Variable is assigned but its value is never used | #pragma warning restore CS0219 // Variable is assigned but its value is never used | ||||
| if (tf.context.executing_eagerly()) | if (tf.context.executing_eagerly()) | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ; | ; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| else | else | ||||
| checkpoint_initializer = null; | checkpoint_initializer = null; | ||||
| @@ -116,7 +116,9 @@ namespace Tensorflow | |||||
| if (variable_def.SaveSliceInfoDef != null) | if (variable_def.SaveSliceInfoDef != null) | ||||
| throw new NotImplementedException("save_slice_info_def"); | throw new NotImplementedException("save_slice_info_def"); | ||||
| else | else | ||||
| #pragma warning disable CS0642 // Possible mistaken empty statement | |||||
| ;// _save_slice_info = null; | ;// _save_slice_info = null; | ||||
| #pragma warning restore CS0642 // Possible mistaken empty statement | |||||
| //_caching_device = null; | //_caching_device = null; | ||||
| //_constraint = null; | //_constraint = null; | ||||