Theano/Theano — pull request #878 by goodfeli (2012-08-21 05:27:48+00:00)
Title: Adds correct handling of unimplemented gradients

-Introduces a BadGradOp used to identify gradients as uncomputable
-Modifies theano.function to raise an exception if given a subgraph containing BadGradOp
-Modifies theano.tensor.grad to raise an exception if it tries to return a subgraph containing BadGradOp
-Adds a GradNotImplementedOp and convenience function grad_not_implemented for identifying a gradient as uncomputable due to not being implemented yet
-Adds unit tests for this functionality

This pull request does NOT do a few things:
-Does not remove any current uses of None to mean a gradient is not implemented... this will be a lot of work and should be done incrementally, I think
-Does not introduce a way to mark a gradient as undefined, but this can be done easily by adding another subclass of BadGradOp when it is needed