| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5466d95 commit 06e6ae6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -143,7 +143,7 @@ public static Tensor rank_internal(Tensor input, string name = null, bool optimi | |||
| 143 | 143 | name = scope; | |
| 144 | 144 | var input_tensor = ops.convert_to_tensor(input); | |
| 145 | 145 | var input_shape = tensor_util.to_shape(input_tensor.shape); | |
| 146 | - if (optimize && input_shape.NDim > -1) | ||
| 146 | + if (optimize && input_shape.NDim > 0) | ||
| 147 | 147 | return constant_op.constant(input_shape.NDim, dtype: tf.int32, name: name); | |
| 148 | 148 | else | |
| 149 | 149 | return gen_array_ops.rank(input, name); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments