| @@ -341,7 +341,9 @@ namespace Tensorflow.Gradients | |||||
| var output_shape_tensor = array_ops.shape(op.outputs[0]); | var output_shape_tensor = array_ops.shape(op.outputs[0]); | ||||
| var factor = _safe_shape_div(math_ops.reduce_prod(input_shape_tensor), math_ops.reduce_prod(output_shape_tensor)); | var factor = _safe_shape_div(math_ops.reduce_prod(input_shape_tensor), math_ops.reduce_prod(output_shape_tensor)); | ||||
| throw new NotImplementedException(""); | throw new NotImplementedException(""); | ||||
| #pragma warning disable CS0162 // Unreachable code detected | |||||
| factor_tensor = null; | factor_tensor = null; | ||||
| #pragma warning restore CS0162 // Unreachable code detected | |||||
| } | } | ||||
| result = math_ops.truediv(sum_grad, math_ops.cast(factor_tensor, sum_grad.dtype)); | result = math_ops.truediv(sum_grad, math_ops.cast(factor_tensor, sum_grad.dtype)); | ||||
| @@ -50,7 +50,9 @@ namespace Tensorflow.Keras | |||||
| value = 0f; | value = 0f; | ||||
| var nd = new NDArray(np.int32, new Shape(sequences.size, maxlen.Value)); | var nd = new NDArray(np.int32, new Shape(sequences.size, maxlen.Value)); | ||||
| #pragma warning disable CS0162 // Unreachable code detected | |||||
| for (int i = 0; i < nd.shape[0]; i++) | for (int i = 0; i < nd.shape[0]; i++) | ||||
| #pragma warning restore CS0162 // Unreachable code detected | |||||
| { | { | ||||
| switch(sequences[i]) | switch(sequences[i]) | ||||
| { | { | ||||
| @@ -422,7 +422,9 @@ namespace Tensorflow | |||||
| { | { | ||||
| throw new NotImplementedException(); | throw new NotImplementedException(); | ||||
| //TODO:! This is not the way to handle string[], it should be done with TF_DecodeString | //TODO:! This is not the way to handle string[], it should be done with TF_DecodeString | ||||
| #pragma warning disable CS0162 // Unreachable code detected | |||||
| using (var reader = new CodedInputStream(new IntPtr(srcAddress).Stream(8, (long) tensor.bytesize))) | using (var reader = new CodedInputStream(new IntPtr(srcAddress).Stream(8, (long) tensor.bytesize))) | ||||
| #pragma warning restore CS0162 // Unreachable code detected | |||||
| ret = NDArray.FromString(reader.ReadString()); | ret = NDArray.FromString(reader.ReadString()); | ||||
| break; | break; | ||||
| } | } | ||||