diff --git a/tests/openface_neural_net_training_tests.py b/tests/openface_neural_net_training_tests.py index f3eb8d5..faf6295 100644 --- a/tests/openface_neural_net_training_tests.py +++ b/tests/openface_neural_net_training_tests.py @@ -64,7 +64,7 @@ def test_dnn_training(): '-nEpochs', '10', '-epochSize', '1', '-cache', netWorkDir, - '-cuda', '-testing', + '-cuda', '-cudnn', '-testing', '-nDonkeys', '-1'] p = Popen(cmd, stdout=PIPE, stderr=PIPE, cwd=os.path.join(openfaceDir, 'training')) diff --git a/training/opts.lua b/training/opts.lua index 375c4f6..9089f85 100644 --- a/training/opts.lua +++ b/training/opts.lua @@ -1,5 +1,3 @@ -local lfs = require 'lfs' - local M = { } -- http://stackoverflow.com/questions/6380820/get-containing-path-of-lua-file diff --git a/training/train.lua b/training/train.lua index 7c2eed3..a3c9e9f 100644 --- a/training/train.lua +++ b/training/train.lua @@ -96,10 +96,10 @@ function train() end end - for i, mod in ipairs(model:listModules()) do + for j, mod in ipairs(model:listModules()) do if torch.typename(mod) == 'nn.SpatialBatchNormalization' then - fixNans(mod.running_mean, string.format("%d-%s-%s", i, mod, 'running_mean')) - fixNans(mod.running_var, string.format("%d-%s-%s", i, mod, 'running_var')) + fixNans(mod.running_mean, string.format("%d-%s-%s", j, mod, 'running_mean')) + fixNans(mod.running_var, string.format("%d-%s-%s", j, mod, 'running_var')) end end