Theano/Theano — pull request #1068 by goodfeli (2012-11-16 07:26:03+00:00)
Title: Fixes several issues with gradients and some other bugs

-Fixes violation of op contract and bugs introduced by pull request that put integer gradients back in the library
-Fixes issue where members of consider_constant were treated differently from Constant variables
-Fixes bug where known gradients provided to grad_sources_inputs were overwritten if they were on integer-typed variables
-Gets rid of grad_sources_inputs; it is now implemented via a new known_grads parameter of the grad function
-Removes some broken Lop unit tests

Fixes some bugs that I found while doing the above:
-Partially fixes bug where get_constant_value has no way of reporting a TypeError because TypeError was used to mean "not constant"
-Fixes bug where Scan assumed all TypeErrors raised by the grad function were due to undefined gradients
-Fixes bug where get_constant_value didn't check whether a subtensor op's indices were constant