diff options
author | brainstorm <timbobel@gmail.com> | 2016-05-26 21:36:58 +0300 |
---|---|---|
committer | brainstorm <timbobel@gmail.com> | 2016-05-26 21:36:58 +0300 |
commit | d0f1cd7cee1632fcc440d602e44e8dfc437d9d95 (patch) | |
tree | b358856514915ee51a0472d0222f5cfd79db4ff8 | |
parent | 95a7b550158d113a5720703ba32693de200a8dd1 (diff) |
Fixes warping scale
-rw-r--r-- | test/test_warp.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_warp.lua b/test/test_warp.lua index 68a4ac1..5c4a1ed 100644 --- a/test/test_warp.lua +++ b/test/test_warp.lua @@ -32,8 +32,8 @@ flow_scale[1] = grid_y flow_scale[2] = grid_x flow_scale[1]:add(1):mul(0.5) -- 0 to 1 flow_scale[2]:add(1):mul(0.5) -- 0 to 1 -flow_scale[1]:mul(height) -flow_scale[2]:mul(width) +flow_scale[1]:mul(height-1) +flow_scale[2]:mul(width-1) flow:add(flow_scale) t0 = sys.clock() @@ -86,8 +86,8 @@ flow_scale[1] = grid_y flow_scale[2] = grid_x flow_scale[1]:add(1):mul(0.5) -- 0 to 1 flow_scale[2]:add(1):mul(0.5) -- 0 to 1 -flow_scale[1]:mul(height) -flow_scale[2]:mul(width) +flow_scale[1]:mul(height-1) +flow_scale[2]:mul(width-1) flow:add(flow_scale) flow_rot = torch.FloatTensor() |