Skip to content

.apply()

Run the op, build the graph node, and wire up the backward step.

Parameters:

  • *inputs (object, default: () ) –

    Tensor and non-Tensor arguments forwarded to forward and output_shape. Non-Tensor inputs are ignored during gradient accumulation.

  • oper (str | None, default: None ) –

    Optional label override for the graph node. Falls back to cls.oper then cls.__name__.

Returns:

  • 'Tensor'

    Output tensor wired into the computation graph.