From 7f4ed1f0dbe121392c23d0db96a19c2002ed8f7e Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Mon, 16 Sep 2019 21:02:37 -0500 Subject: [PATCH] tf.rank #396 --- src/TensorFlowNET.Core/APIs/tf.array.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/TensorFlowNET.Core/APIs/tf.array.cs b/src/TensorFlowNET.Core/APIs/tf.array.cs index 99856a59..9dc72165 100644 --- a/src/TensorFlowNET.Core/APIs/tf.array.cs +++ b/src/TensorFlowNET.Core/APIs/tf.array.cs @@ -84,6 +84,15 @@ namespace Tensorflow public Tensor transpose(T1 a, int[] perm = null, string name = "transpose", bool conjugate = false) => array_ops.transpose(a, perm, name, conjugate); + /// + /// Returns the rank of a tensor. + /// + /// + /// + /// Returns a 0-D `int32` `Tensor` representing the rank of `input`. + public Tensor rank(Tensor input, string name = null) + => array_ops.rank(input, name: name); + public Tensor squeeze(Tensor input, int[] axis = null, string name = null, int squeeze_dims = -1) => gen_array_ops.squeeze(input, axis, name);