How to write a custom loss function in Tensorflow?

前端 未结 3 1006
旧时难觅i
旧时难觅i 2020-12-08 02:45

I am new to tensorflow. I want to write my own custom loss function. Is there any tutorial about this? For example, the hinge loss or a sum_of_square_loss(thoug

3条回答
  •  天涯浪人
    2020-12-08 02:56

    In addition to the other answer, you can write a loss function in Python if it can be represented as a composition of existing functions.

    Take a look, for example, at the implementation of sigmoid_cross_entropy_with_logits link, which is implemented using basic transformations.

提交回复
热议问题