Browse Source

tf.rank #396

tags/v0.12
Oceania2018 6 years ago
parent
commit
7f4ed1f0db
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/TensorFlowNET.Core/APIs/tf.array.cs

+ 9
- 0
src/TensorFlowNET.Core/APIs/tf.array.cs View File

@@ -84,6 +84,15 @@ namespace Tensorflow
public Tensor transpose<T1>(T1 a, int[] perm = null, string name = "transpose", bool conjugate = false)
=> array_ops.transpose(a, perm, name, conjugate);

/// <summary>
/// Returns the rank of a tensor.
/// </summary>
/// <param name="input"></param>
/// <param name="name"></param>
/// <returns>Returns a 0-D `int32` `Tensor` representing the rank of `input`.</returns>
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);



Loading…
Cancel
Save