title: How does Keras back propagate custom loss function?
body: <p>I've studied plenty of examples of custom loss functions for Keras. All of them can be summaraized as "just write it". Namely, one need to write function taking parameters (y_true, y_pred). But normally CNN needs a derivative of a loss function for back propagation. For instance, if you implement custom loss in Caffe, you have to write 2 function: the loss you need itself, and it's derivative for backward propagation. But in Keras it seems you have no need in the 2nd one. How does this magic works?</p>