Как это может быть, что это работает
g_W = T.grad(cost=cost, wrt=classifier.vparamW)
тогда как это
H_W=T.hessian(cost=cost, wrt=classifier.vparamW)
дает NotImplementedError () может быть проблема в такой функции стоимости:
-T.mean(T.log(self.p_y_given_x)[T.arange(y.shape[0]), y])
Здесь y - вектор меток классов от 0 до n-1 и
self.p_y_given_x = T.nnet.softmax(T.dot(input, self.W) + self.b)