mm.math.custom_gradient

math.custom_gradient(func)

A decorator to define a function with a custom gradient.