megengine.module.init.ones_#

ones_(tensor)[source]#

Fills the given tensor with the scalar value 1.

Parameters:

tensor (Tensor) – tensor to be initialized.

Return type:

None