Skip to content

Instantly share code, notes, and snippets.

@bayerj
Created October 5, 2012 09:43
Show Gist options
  • Select an option

  • Save bayerj/3838975 to your computer and use it in GitHub Desktop.

Select an option

Save bayerj/3838975 to your computer and use it in GitHub Desktop.
import theano.tensor as T
x = T.matrix()
c = T.matrix()
s = T.switch(c, x, 0)
l = s.sum()
T.grad(l, x) # Assertion error...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment