diff options
author | marris <marris@google.com> | 2015-06-18 19:38:55 +0300 |
---|---|---|
committer | marris <marris@google.com> | 2015-06-18 19:38:55 +0300 |
commit | fed11c52fa5b3e03a0548d612d5f507b328a3800 (patch) | |
tree | 9e9f976325cf295d4762fb9b5f2acbcf326a51fa | |
parent | e7c3cdb97d5bc890f7d7fff1144bb273ffdc37f3 (diff) |
Fix for using non-torch.DoubleTensor inputs to image.gaussianpyramid
-rwxr-xr-x | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1954,18 +1954,18 @@ function image.gaussianpyramid(...) end if src:nDimension() == 2 then for i = 1,#scales do - dst[i] = dst[i] or torch.Tensor() + dst[i] = dst[i] or src.new() dst[i]:resize(src:size(1)*scales[i], src:size(2)*scales[i]) end elseif src:nDimension() == 3 then for i = 1,#scales do - dst[i] = dst[i] or torch.Tensor() + dst[i] = dst[i] or src.new() dst[i]:resize(src:size(1), src:size(2)*scales[i], src:size(3)*scales[i]) end else dok.error('src image must be 2D or 3D', 'image.gaussianpyramid') end - local k = image.gaussian{width=3, normalize=true} + local k = image.gaussian{width=3, normalize=true}:typeAs(src) local tmp = src for i = 1,#scales do if scales[i] == 1 then |