mean_squared_error¶
- dragon.vm.tensorflow.keras.losses.- mean_squared_error(
 y_true,
 y_pred,
 reduction='mean'
 )[source]¶
- Compute the reduced element-wise squared error. - Examples: - y_true = tf.constant([1., 2., 3.]) y_pred = tf.constant([0., 0., 0.]) print(tf.keras.cost.mean_squared_error(y_true, y_pred)) # 4.666666 - Parameters:
- y_true (dragon.Tensor) – The ground truth tensor.
- y_pred (dragon.Tensor) – The logits tensor.
- reduction ({'none', 'sum', 'mean'}, optional) – The reduction method.
 
 - Returns:
- dragon.Tensor – The loss. 
 
