shape

dragon.vm.tensorflow.shape(
  input,
  name=None
)[source]

Return the shape of input.

Examples:

x = tf.ones((2, 3))
print(x.shape)  # Return a sequence
print(tf.shape(x))  # Return a tensor
Parameters:
  • input (dragon.Tensor) – The input tensor.
  • name (str, optional) – The operation name.
Returns:

dragon.Tensor – The tensor shape.