FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix rank_internal works for both kNN and CNN examples. · attackgithub/TensorFlow.NET@06e6ae6 · GitHub

Repository navigation

Commit 06e6ae6

Browse files
committed
fix rank_internal works for both kNN and CNN examples.
1 parent 5466d95 commit 06e6ae6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/TensorFlowNET.Core/Operations/array_ops.py.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static Tensor rank_internal(Tensor input, string name = null, bool optimi
143143
name = scope;
144144
var input_tensor = ops.convert_to_tensor(input);
145145
var input_shape = tensor_util.to_shape(input_tensor.shape);
146-
if (optimize && input_shape.NDim > -1)
146+
if (optimize && input_shape.NDim > 0)
147147
return constant_op.constant(input_shape.NDim, dtype: tf.int32, name: name);
148148
else
149149
return gen_array_ops.rank(input, name);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL