Closed AFOXCOW closed 4 years ago
simple fix: K.mean instead of K.sum
Thanks a lot. Thats what I have done. But can you update the code for future readers. Thanks again.
hi @AFOXCOW , @celinew1221 , in which line should we fix it?
hi @AFOXCOW , @celinew1221 , in which line should we fix it?
I submitted a pull request regarding this.
Many Thanks @celinew1221 Let's merge.
the keras custom loss function input shape require (batchsize,outputshape) or (outputshape,batchsize), but your code is calculate the loss of one output picture. thus leading the loss value vary from the batchsize. the first is calculated with batchsize=1 the second is calculated with batchsize=10