fill

dragon.vm.tensorflow.fill(
  dims,
  value=0,
  dtype=None,
  name=None
)[source]

Return a tensor filled with the scalar value.

\[\text{out} \leftarrow \text{value} \]

Examples:

x = tf.fill([2, 3], value=9)
Parameters:
  • dims (Sequence[Union[int, dragon.Tensor]]) – The shape of the tensor.
  • value (number, optional, default=0) – The value to fill.
  • dtype (str, optional) – The optional data type.
  • name (str, optional) – The operation name.
Returns:

dragon.Tensor – The output tensor.