Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Convolution kernel size issue.(Turns out to be an issue about different order of dimensions between Python and R) #1565

Closed
firearasi opened this issue Mar 3, 2016 · 2 comments

Comments

@firearasi
Copy link

The image sizes are c(3,224,224) (with dataIterator created with im2rec)
And the current net structure is (I know the convolution layers are too few,but this is my debugging step)


net= 'data' %>% mx.symbol.Variable() %>%
  #224

  mx.symbol.Convolution(kernel=c(4,4),num.filter=40,stride=c(4,4)) %>%
  #56 
  mx.symbol.Activation(act.type='tanh') %>%

  mx.symbol.Flatten() %>%

  mx.symbol.FullyConnected(num.hidden=300) %>%
  mx.symbol.Activation(act.type='relu') %>%

  mx.symbol.FullyConnected(num.hidden=100) %>%
  mx.symbol.Activation(act.type='tanh') %>%

  mx.symbol.FullyConnected(num.hidden=2) %>%
  mx.symbol.SoftmaxOutput()

And when I trained the model, I immediately got the error message:
_" D:\chhong\mxnet\dmlc-core\include\dmlc/logging.h:241: [16:33:03] d:\chhong\mxnet\src\operator./convolution-inl.h:337: Check failed: ksize_x <= dshape[3] && ksize_y <= dshape[2] kernel size exceed input
Error: InferShape Error in convolution21: [16:33:03] d:\chhong\mxnet\src\operator./convolution-inl.h:337: Check failed: ksize_x <= dshape[3] && ksize_y <= dshape[2] kernel size exceed input "
_
So what part am I doing wrong?

@firearasi
Copy link
Author

By trial and error, it seems that in R the data shape should be c(224,224,3),
need confirmation.

@firearasi firearasi changed the title Convolution kernel size issue. Convolution kernel size issue.(Turns out to be an issue about different order of dimensions between Python and R) Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants