Function autograd::ops::mean_squared_error [] [src]

pub fn mean_squared_error(a: &Tensor, b: &Tensor) -> Tensor

Just computes 0.5*(a-b)2.

The performance is better than directly computing 0.5*(a-b)2 if the gradient computation is required.

Panics

When a.shape != b.shape.