Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hessian.lua')
-rw-r--r--hessian.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/hessian.lua b/hessian.lua
index 4ecc90a..af604d5 100644
--- a/hessian.lua
+++ b/hessian.lua
@@ -336,7 +336,7 @@ function nn.hessian.enable()
local flatParameters = flatten(parameters)
local flatGradParameters = flatten(gradParameters)
local flatHessianParameters
- if hessianParameters[1] then
+ if hessianParameters and hessianParameters[1] then
flatHessianParameters = flatten(hessianParameters)
end