easy primitives

Implement Mean Squared Error

Implement the Mean Squared Error (MSE) loss function.

$$\text{MSE} = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2$$

Input: Two 1D tensors y_true and y_pred of the same shape

Output: A scalar tensor representing the mean squared error

Hints

loss basics regression
Detecting runtime...