Dragon API Dragon v0.3.0 Python Ones¶ class dragon.vm.tensorflow.keras.initializers.Ones(dtype='float32')[source]¶ Fill tensor with ones. \[\text{tensor} \leftarrow 1 \] __init__¶ Ones.__init__(dtype='float32')[source]¶ Create a Ones initializer. Parameters: dtype (str, optional, default='float32') – The data type to set as default. Methods¶ __call__¶ Ones.__call__( shape, dtype=None, **kwargs)[source]¶ Return a tensor initialized from the initializer. Parameters: shape (Sequence[int]) – The tensor shape. dtype (str, optional) – The optional data type. Returns:dragon.Tensor – The output tensor.