diff --git a/batch-represent/batch-represent.lua b/batch-represent/batch-represent.lua index 2e39a2b..f8f6062 100644 --- a/batch-represent/batch-represent.lua +++ b/batch-represent/batch-represent.lua @@ -46,7 +46,9 @@ function repBatch(paths, inputs, labels) inputs = inputs:cuda() end local embeddings = model:forward(inputs):float() - cutorch.synchronize() + if opt.cuda then + cutorch.synchronize() + end for i=1,n do labelsCSV:write({labels[i], paths[i]}) diff --git a/batch-represent/main.lua b/batch-represent/main.lua index 5b1e7c7..28c8faf 100755 --- a/batch-represent/main.lua +++ b/batch-represent/main.lua @@ -10,7 +10,6 @@ require 'csvigo' require 'nn' require 'dpnn' -require 'inn' local opts = paths.dofile('opts.lua')