def jacobian1(f, v):
 f = tt.flatten(f)
 idx = tt.arange(f.shape[0])
 def grad_i(i):
  return gradient1(f[i], v)
 return theano.map(grad_i, idx)[0]

def jacobian1 ( f , v ) : f = tt . flatten ( f ) idx = tt . arange ( f . shape [ 0 ] ) def grad_i ( i ) : return gradient1 ( f [ i ] , v ) return theano . map ( grad_i , idx ) [ 0 ]
jacobian of f wrt v .