Solved by ptrblck in post #2 
              
              
                Could you check your imports and variable names, as based on the error message it seems you might have overridden the hessian method with a tensor using the same name.