Hello dear community members.
I am facing this weird behavior of 
conv2d()
function in a convent.

I'll try to explain the situation with a simple example of a convent with 
only two convolutions.
Imagine that I have the following filters and their corresponding size
w1 = (32, 1, 1, 1)
w2 = (64, 32, 3, 3)

Then my convent would be something like the following:
h1 = conv2d(X, w1, image_shape=(64, 1, 28, 28), filter_shape=w1.shape)
h1p = pool_2d(h1, ds=(2,2), st=(1,1), ignore_border=True)
h2 = conv2d(h1p, w2, image_shape=(64, 32, 14, 14), filter_shape=w2.shape)
h2p = pool_2d(h2, ds(2,2), st=(1,1), ignore_border=True)

In this case I get an error complaining about the image shape as an input 
regarding the second convolution. It says that should be 27 instead of 14.
This where things start to get a bit unclear for me. By looking at the 
conv2d() documentation its says that if you use the valid mode which is the 
default
in this case then the output image_shape from the convolution is computed 
as image_shape - filter_shape + 1.
If we consider that then from our first image_shape=(64, 1, 28, 28) as 
input to the first convolution operation we would have the following 
image_shape dimension:
image_height = 28 - 1 (filter_height) + 1 (Constant)
new_image_height = 28 (unchanged from the above computations)

now if we do a downsampling with filter size = (2,2)

final_new_image_height = 28/2 = 14

As I have exactly putted in my second convolution. Now why is theano 
complaining about that and is asking that the input should be 27 instead 
for the image height and width. It seems like the pooling is either being 
skipped or never considered by theano in this case. Why is that happening?

Any developers of theano who can shed some light on this topic?

Thanks!


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to