I remember in a few of the lessons @jeremy talked about how we don’t need to worry about the derivative side of our loss function because keras could automatically calculate it for us.

I just want to make sure my understanding there is correct, particularly in the case for custom loss functions. Can we combine arbitrary functions in our loss function and then expect keras to solve for the derivative in the underlying loss function space? Is keras doing so by solving for the local gradient?

I’m currently working on a style transfer problem with a loss function that combines a series of histograms as well as the sse of two images as the style component and I’m wondering if I need to do anything more than just rewrite the loss function.

The style transfer examples from lesson 8-10 make it seem very straightforward but I want to be sure that this concept generalizes and that I’m not making incorrect assumptions.