Skip to content
fn

mse_loss_op

→TensorImplPtr
int mse_loss_op(const int & input, const int & target, int reduction)

Python wrappers

Public Python APIs implemented by this engine symbol.

Public mean-squared-error entry point.

Thin wrapper that casts reduction to Reduction and delegates to MseLossBackward::forward.

Parameters

inputTensorImplPtr
Predicted tensor.
targetTensorImplPtr
Ground-truth tensor of the same shape and dtype.
reductionint
0 (None), 1 (Mean), or 2 (Sum).

Returns

TensorImplPtr

Scalar (Mean / Sum) or per-element (None) loss.