Batch Represent: Remove unnecessary CUDA dependency.

This commit is contained in:
Brandon Amos 2015-09-29 18:02:01 -04:00
parent 5bffd697cc
commit 8728bae648
2 changed files with 3 additions and 2 deletions

View File

@ -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]})

View File

@ -10,7 +10,6 @@ require 'csvigo'
require 'nn'
require 'dpnn'
require 'inn'
local opts = paths.dofile('opts.lua')