diff options
author | Thomas Köppe <tkoeppe@google.com> | 2016-05-04 15:40:50 +0300 |
---|---|---|
committer | Thomas Köppe <tkoeppe@google.com> | 2016-05-04 16:23:28 +0300 |
commit | 416abb90c4035f983e747044cf0a1983ea30099c (patch) | |
tree | 893ddbafb1b74e6735e7e6ff73bed40f5b0c9293 | |
parent | 2aab35acef8bd773b083c14ac080ef07ae6433cf (diff) |
Fix double-to-byte conversion order
-rw-r--r-- | test/test.lua | 4 |
1 files 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 |