python - The output size of theano.tensor.nnet.conv.conv2d -


the function being used on tutorials , other place of form:

conv_out = conv2d(         input= x, # 4d tensor          filters= w, # shared variable         filter_shape= [ nkerns, stack_size, filter_height, filter_width ],         image_shape= [ batch_size, stack_size, height, width ]     ) 
  1. if first layer of cnn, have filter_shape [ 20, 1 , 7, 7 ] number of kernals being 20, each 7 x 7, '1' stand ? image_shape [100, 1, 84, 84 ].

  2. this convolution outputs tensor of shape [ 100, 20, 26, 26] understand. next layer takes parameters filter_shape = [50, 20, 5 ,5 ] , image_shape = [ 100, 20 ,26, 26 ] , produces output of shape [ 100 ,50 ,11 ,11 ]. seem kind of understand operation, except, if want use '50' filters layer each working on previous 20 feature maps produced, shouldn't produce 1000 feature maps in instead of producing 50 feature maps ? restate question, have stack of 20 feature maps each running 50 kernals of convolution, shouldn't output shape [100, 1000, 11, 11] instead of [ 100, 50 , 11, 11] ?

to answer questions:

  1. the 1 stands number of input channels. seem using gray scale images, one. color images can 3. other convolutional layers in second question, must equal number of outputs previous layer generated.

  2. using filter of size [50, 20, 5, 5] on input signal of [100, 20, 26, 26] example first question, well. have here 50 filters of shape [20, 5, 5]. every image of shape [20, 26, 26]. convolution uses 20 channels each time: filter 0 gets applied image channel 0, filter 1 gets applied image 1, , whole result gets summed up. make sense?


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -