Skip to content
fn

zeros_like_op

→TensorImplPtr
int zeros_like_op(const int & a, bool requires_grad)

Python wrappers

Public Python APIs implemented by this engine symbol.

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

Parameters

aTensorImplPtr
Tensor whose metadata is mirrored.
requires_gradbool
Attach a fresh autograd leaf when true.

Returns

TensorImplPtr

New leaf tensor with the same shape/dtype/device as a.