Skip to content
fn

full_like_op

→TensorImplPtr
int full_like_op(const int & a, double fill_value, bool requires_grad)

Python wrappers

Public Python APIs implemented by this engine symbol.

Create a constant-filled tensor matching a in shape, dtype, and device.

Parameters

aTensorImplPtr
Tensor whose metadata is mirrored.
fill_valuedouble
Scalar value cast to a.dtype() before filling.
requires_gradbool
Attach a fresh autograd leaf when true.

Returns

TensorImplPtr

New leaf tensor with constant content.