Why doesn't the L2 loss sum over the errors? #193
Answered
by
mkunesch
brynhayder
asked this question in
General
-
Title is self explanatory. Why doesn't this have a sum in it (e.g. for multi-output regression)? |
Beta Was this translation helpful? Give feedback.
Answered by
mkunesch
Nov 17, 2021
Replies: 1 comment
-
Hi! Thanks a lot for the question! In my opinion, this has two main advantages:
There might of course be other advantages/considerations too, but these were the first ones I could think of! Hope this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mtthss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thanks a lot for the question!
In my opinion, this has two main advantages:
jnp.sum
to thel2_loss
a user who wants to take theargmin
of thel2_loss
couldn't use the optax implementation.jnp.mean
in the loss, we would get a slightly wrong result if we also took ajax.lax.pmean
on top of this. If no redu…