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

github.com/clementfarabet/lua---nnx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2011-10-23 09:03:31 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-10-23 09:03:31 +0400
commit2bc3c864e813baf33ad0bab77e7790d6f58aa6dd (patch)
tree1ede085a173d99d62782aa4c52975859bee89cd8 /SpatialColorTransform.lua
parentf2c27cf7bad2046b979bc9fd1fd0b1881bf2c266 (diff)
made spatialcolortransform compat with type()
Diffstat (limited to 'SpatialColorTransform.lua')
-rw-r--r--SpatialColorTransform.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/SpatialColorTransform.lua b/SpatialColorTransform.lua
index 2179b0c..a06efd4 100644
--- a/SpatialColorTransform.lua
+++ b/SpatialColorTransform.lua
@@ -122,6 +122,13 @@ function SpatialColorTransform:backward(input, gradOutput)
return self.gradInput
end
+function SpatialColorTransform:type(type)
+ parent.type(self,type)
+ if self.islinear then
+ self.linear:type(type)
+ end
+end
+
function SpatialColorTransform:write(file)
parent.write(self, file)
file:writeObject(self.transform)
@@ -138,4 +145,5 @@ function SpatialColorTransform:read(file)
if self.islinear then
self.linear = file:readObject()
end
+ self.type = nil
end