From 416abb90c4035f983e747044cf0a1983ea30099c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 4 May 2016 13:40:50 +0100 Subject: Fix double-to-byte conversion order --- test/test.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.lua b/test/test.lua index c0c3bf3..8040673 100644 --- a/test/test.lua +++ b/test/test.lua @@ -16,10 +16,10 @@ end local function toByteTensor(x) - local y = torch.round(x):byte() + local y = torch.round(x) y[torch.le(x, 0)] = 0 y[torch.ge(x, 255)] = 255 - return y + return y:byte() end -- cgit v1.2.3