Batch Represent: Remove unnecessary CUDA dependency.
This commit is contained in:
parent
5bffd697cc
commit
8728bae648
|
@ -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]})
|
||||
|
|
|
@ -10,7 +10,6 @@ require 'csvigo'
|
|||
|
||||
require 'nn'
|
||||
require 'dpnn'
|
||||
require 'inn'
|
||||
|
||||
local opts = paths.dofile('opts.lua')
|
||||
|
||||
|
|
Loading…
Reference in New Issue