Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/image.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2015-08-24 20:45:35 +0300
committerSam Gross <colesbury@gmail.com>2015-08-24 20:45:35 +0300
commit340b26957739cdc3583faec7e805194522e51fb5 (patch)
treef17a24ef142fc46806d64653e745e68f5b413051
parentde926c7de81cf317ef92b908cacf20c8978efbfc (diff)
Fix clampImage function call to saturate
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index f1658cf..8c0ca0d 100644
--- a/init.lua
+++ b/init.lua
@@ -143,8 +143,8 @@ local function clampImage(tensor)
return tensor
end
local a = torch.Tensor():resize(tensor:size()):copy(tensor)
- a.image.saturate(tensor) -- bound btwn 0 and 1
- a:mul(255) -- remap to [0..255]
+ a.image.saturate(a) -- bound btwn 0 and 1
+ a:mul(255) -- remap to [0..255]
return a
end