chainerx.squared_error

chainerx.squared_error()

Element-wise squared error function.

Computes the element-wise squared error \(L\) between two inputs \(x_1\) and \(x_2\) defined as follows.

\[L = (x_1 - x_2)^2\]

Can be used to compute mean squared error by just calling mean() on the output array.

Parameters
Returns

A variable holding an array representing the squared error of two inputs.

Return type

ndarray