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:
Diffstat (limited to 'generic/SpatialDownSampling.c')
-rw-r--r--generic/SpatialDownSampling.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/SpatialDownSampling.c b/generic/SpatialDownSampling.c
index e5c3c47..4e1fc5a 100644
--- a/generic/SpatialDownSampling.c
+++ b/generic/SpatialDownSampling.c
@@ -48,6 +48,8 @@ static int nn_(SpatialDownSampling_updateGradInput)(lua_State *L) {
int rW = luaT_getfieldcheckint(L, 1, "rW");
int rH = luaT_getfieldcheckint(L, 1, "rH");
+ THArgCheck(gradOutput->nDimension == 3, 2, "gradOutput must be 3D Tensor");
+
// dims
int owidth = gradOutput->size[2];
int oheight = gradOutput->size[1];