Hi Everyone, I am trying to use strides (subsample) in LeNet example.

So I have just changed:

 # convolve input feature maps with filters
        conv_out = conv2d(
            input=input,
            filters=self.W,
            filter_shape=filter_shape,
            input_shape=image_shape
        )

        # pool each feature map individually, using maxpooling
        pooled_out = pool.pool_2d(
            input=conv_out,
            ds=poolsize,
            ignore_border=True
        )



into:



conv_out = conv.conv2d(
    input=input,
    filters=self.W,
    subsample=(2,2),
    filter_shape=filter_shape,
    input_shape=image_shape
)

# downsample each feature map individually, using maxpooling
pooled_out = pool.pool_2d(
    input=conv_out,
    ds=poolsize,
    ignore_border=True,
    mode='max'
)


And I am having the following error:



Traceback (most recent call last):
... building the model
  File "/home/beaa/Escritorio/Theano/Lenet_original/ejemploCNN_LeNet.py", line 
427, in <module>
    evaluate_lenet5()
  File "/home/beaa/Escritorio/Theano/Lenet_original/ejemploCNN_LeNet.py", line 
193, in evaluate_lenet5
    poolsize=(2, 2)ut
  File "/home/beaa/Escritorio/Theano/Lenet_original/ejemploCNN_LeNet.py", line 
105, in __init__
    input_shape=image_shape
  File 
"/home/beaa/.local/lib/python2.7/site-packages/theano/tensor/nnet/conv.py", 
line 151, in conv2d
    imshp=imshp, kshp=kshp, nkern=nkern, bsize=bsize, **kargs)
TypeError: __init__() got an unexpected keyword argument 'input_shape'






Also, I would k¡like to know if the 'fanout' variable had to be changed, 
because the number of output neurons would not be the same, any ideas?

Thanks for your help.

Regards.

-- 

--- 
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