Should the custom loss function in Keras return a single loss value for the batch or an arrary of losses for every sample in the training batch?

后端 未结 6 1459
南笙
南笙 2020-12-20 17:30

I\'m learning keras API in tensorflow(2.3). In this guide on tensorflow website, I found an example of custom loss funciton:

    def custom_mean_squared_error         


        
6条回答
  •  梦毁少年i
    2020-12-20 18:12

    I opened an issue on github. It's confirmed that custom loss function is required to return one loss value per sample. The example will need to be updated to reflect this.

提交回复
热议问题