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
path: root/test
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2014-07-01 20:27:21 +0400
committerSoumith Chintala <soumith@gmail.com>2014-07-01 20:27:21 +0400
commitfceaba81f2925e43a1a36bbc4ead550bc6f38cef (patch)
treefe07be1e7a5e5fbf390b66562ab9128d30f17c36 /test
parente73293539b424118a5e79dff8ae74dc337a76325 (diff)
parentf32f33b49680a6bda36e13c4a8ada2e11ef61496 (diff)
Merge github.com:torch/nn into linear_fix
Diffstat (limited to 'test')
-rw-r--r--test/test.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua
index 6832885..04b1dd8 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -1887,6 +1887,13 @@ function nntest.View()
mytester:assertTableEq(module:forward(minibatch):nElement(),
minibatch:nElement(),
"Error in minibatch nElement")
+ local module = nn.View(-1):setNumInputDims(1)
+ mytester:assertTableEq(module:forward(minibatch):size(1),
+ minibatch:size(1),
+ "Error in minibatch dimension with size -1")
+ mytester:assertTableEq(module:forward(minibatch):nElement(),
+ minibatch:nElement(),
+ "Error in minibatch nElement with size -1")
end
-- Define a test for SpatialUpSamplingCuda