ones_like¶
dragon.vm.tensorflow.
ones_like
(
input,
dtype='float32',
name=None
)[source]¶Return a tensor of ones with shape as the other.
\[\text{out} \leftarrow 1 \]Examples:
x = tf.ones(shape=(2, 3)) y = tf.ones_like(x)
- Parameters:
- input (dragon.Tensor) – The tensor to hint the shape.
- dtype (str, optional, default='float32') – The optional data type.
- name (str, optional) – The operation name.