def rank(input, name: nil)
      input = convert_to_tensor(input)
      return cons(input.shape.ndims) if input.shape.known?
      _op(:rank, input, name: name)
    end
def rank(input, name: nil)
      input = convert_to_tensor(input)
      return cons(input.shape.ndims) if input.shape.known?
      _op(:rank, input, name: name)
    end
Returns the rank of a tensor


 @param input A tensor

 Options:
 @option name Optional name
 @return Tensor