#NEWLINE# def test_grad_switch( ) : #NEWLINE# #INDENT# x = theano . tensor . matrix ( ) #NEWLINE# c = theano . tensor . matrix ( ) #NEWLINE# s = theano . tensor . switch ( c , x , 0 ) #NEWLINE# l = s . sum ( ) #NEWLINE# theano . gradient . grad ( l , x )