Ones

class dragon.vm.tensorlayer.initializers.Ones[source]

Fill tensors with ones.

\[y \leftarrow 0 \]

__init__

Ones.__init__()[source]

Create a Zeros initializer.

Methods

__call__

Initializer.__call__(
  shape,
  dtype='float32',
  **kwargs
)[source]

Return a tensor initialized as specified initializer.

Parameters:
  • shape (Sequence[int]) – The shape of the tensor.
  • dtype (str, optional, default='float32') – The optional data type.
Returns:

dragon.Tensor – The output tensor.