You can just to implement the gradient for your function, here is the guide in theano:
http://deeplearning.net/software/theano/extending/extending_theano.html
You can just to implement the gradient for your function, here is the guide in theano:
http://deeplearning.net/software/theano/extending/extending_theano.html