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-07-28 22:35:56 +0400
committerClement Farabet <clement.farabet@gmail.com>2011-07-28 22:35:56 +0400
commitcaf841358aa8819d8489fea228b610369a2f5a30 (patch)
treea205b69e5417376f793e24cdf7ef9a72d6298b00
parent4fe018c20f291e00b7bca2849c4cf0c9e1415903 (diff)
Added condition on the loading of certain modules.
(the reason is that those modules are going to be available in the new torch version)
-rw-r--r--init.lua34
1 files changed, 19 insertions, 15 deletions
diff --git a/init.lua b/init.lua
index 40edc52..bbe5662 100644
--- a/init.lua
+++ b/init.lua
@@ -54,23 +54,27 @@ torch.include('nnx', 'Probe.lua')
-- OpenMP module:
torch.include('nnx', 'OmpModule.lua')
--- pointwise modules:
-torch.include('nnx', 'Abs.lua')
-torch.include('nnx', 'Power.lua')
-torch.include('nnx', 'Square.lua')
-torch.include('nnx', 'Sqrt.lua')
-torch.include('nnx', 'HardShrink.lua')
-torch.include('nnx', 'Threshold.lua')
+-- those packages are available in a beta branch of Torch7,
+-- and will soon disapear from here
+if not nn.Abs then
+ -- pointwise modules:
+ torch.include('nnx', 'Abs.lua')
+ torch.include('nnx', 'Power.lua')
+ torch.include('nnx', 'Square.lua')
+ torch.include('nnx', 'Sqrt.lua')
+ torch.include('nnx', 'HardShrink.lua')
+ torch.include('nnx', 'Threshold.lua')
--- table-based modules:
-torch.include('nnx', 'CMulTable.lua')
-torch.include('nnx', 'CAddTable.lua')
-torch.include('nnx', 'CDivTable.lua')
-torch.include('nnx', 'CSubTable.lua')
+ -- table-based modules:
+ torch.include('nnx', 'CMulTable.lua')
+ torch.include('nnx', 'CAddTable.lua')
+ torch.include('nnx', 'CDivTable.lua')
+ torch.include('nnx', 'CSubTable.lua')
--- reshapers:
-torch.include('nnx', 'Narrow.lua')
-torch.include('nnx', 'Replicate.lua')
+ -- reshapers:
+ torch.include('nnx', 'Narrow.lua')
+ torch.include('nnx', 'Replicate.lua')
+end
-- spatial (images) operators:
torch.include('nnx', 'SpatialLinear.lua')