commit e8a05d2a1d0c4481fc527d55041a95c452cfc94a
parent 438fcd86b434e20853df3421c4e9ef6bafc2620d
Author: umhau <umhau@users.noreply.github.com>
Date: Thu, 16 Feb 2017 13:37:46 -0500
diag
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sample.lua b/sample.lua
@@ -148,13 +148,15 @@ repeat
gprint('--------------------------')
print('1')
prediction = torch.Tensor(1, #ivocab):fill(1)/(#ivocab)
+ prin('2')
if opt.gpuid >= 0 and opt.opencl == 0 then prediction = prediction:cuda() end
- if opt.gpuid >= 0 and opt.opencl == 1 then prediction = prediction:cl() end
+ print('3')
+ if opt.gpuid >= 0 and opt.opencl == 1 then prediction = prediction:cl() end
end
-- start sampling/argmaxing
for i=1, opt.length do
-
+ print('4')
-- log probabilities from the previous timestep
if opt.sample == 0 then
-- use argmax