brainpy.losses.mean_absolute_error#

brainpy.losses.mean_absolute_error(x, y, axis=None)[source]#

Computes the mean absolute error between x and y.

Parameters
  • x – a tensor of shape (d0, .. dN-1).

  • y – a tensor of shape (d0, .. dN-1).

  • keep_axis – a sequence of the dimensions to keep, use None to return a scalar value.

Returns

tensor of shape (d_i, …, for i in keep_axis) containing the mean absolute error.