I read in a related question that keras custom loss function have to return one scalar per batch item.
I wrote a loss function that output a scalar for the whole batch and the network seems to converge. However I am not able to find any documentation on this or what exactly happens in the code. Is there a broadcasting done somewhere ? What happens if I add sample weights? Does someone has a pointer to where the magic happens ?
Thanks!