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

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicholas-leonard <nick@nikopia.org>2014-07-06 21:54:21 +0400
committernicholas-leonard <nick@nikopia.org>2014-07-06 21:54:21 +0400
commit860067a7e7db0749cd88bc687855df9a8290177c (patch)
tree3f31529446c5deea5b8b41d7de8a703a437cf401 /Parallel.lua
parenteaa42b957a79e58071762ac44d48189ff7ed013b (diff)
added Module:evaluate/training
Diffstat (limited to 'Parallel.lua')
-rw-r--r--Parallel.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/Parallel.lua b/Parallel.lua
index 3c625bc..547f444 100644
--- a/Parallel.lua
+++ b/Parallel.lua
@@ -108,6 +108,18 @@ function Parallel:updateParameters(learningRate)
end
end
+function Parallel:training()
+ for i=1,#self.modules do
+ self.modules[i]:training()
+ end
+end
+
+function Parallel:evaluate()
+ for i=1,#self.modules do
+ self.modules[i]:evaluate()
+ end
+end
+
function Parallel:share(mlp,...)
for i=1,#self.modules do
self.modules[i]:share(mlp.modules[i],...);