Can you post the error?
On Saturday, August 12, 2017 at 1:59:06 AM UTC-7, Jyotiranjan Beuria wrote:
>
> I further tried to calculate Hessian by
>
> import numpy as np
> import theano
> import theano.tensor as T
> import theano.tensor.nlinalg as nlin
>
> s=T.dmatrix('s')
> x=T.dvector('x')
> a=T.dscalar('a')
> def smat(x,a):
> return [[x[0]**2,x[1],x[2]],
> [x[1]**2,a*x[1],a*x[0]],
> [x[2]**2,x[0],a*x[1]]]
> s=smat(x,a)
> v,w=nlin.eigh(T.stacklists(smat(x,a)))
>
> TH,updates = theano.scan(lambda i: T.hessian(v[i], x),
> sequences=T.arange(v.shape[0]))
> Hes = theano.function([x,a], TH,updates=updates)
>
> It does not work. Can anyone help?
>
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.