fn
ones_op
→TensorImplPtrint ones_op(const int & shape, Dtype dt, Device device, bool requires_grad)Python wrappers
Public Python APIs implemented by this engine symbol.Create a tensor of the given shape filled with ones.
Parameters
shapeShapeDesired output shape.
dtDtypeElement dtype.
deviceDeviceTarget device.
requires_gradboolAttach a fresh autograd leaf when true.
Returns
TensorImplPtrLeaf tensor of the specified shape filled with .