Skip to content

How to implement the real LeNet5 in theano? #78

Closed
@Lancelod-Liu

Description

@Lancelod-Liu

By now, LeNet5 is implemented using the below code to get the convolved output:

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

where conv.conv2d is a full-connected convolution operation. Each output feature map is got by convolving all the input feature maps with its kernel and suming them.
However, we know that LeNet5 actually is not working that way.
In LeNet5, each output feature map is got by convolving several selected feature maps with its kernel as below (image from Zohra Saidane and Christophe Garcia, “Automatic scene text recognition using a convolutional neural network,” in Proceedings of the Second International Workshop):

1 automatic scene text recognition using a convolutional neural network

This mechanism works as a regularization process.
I think we could manually convolve some maps of the input and finally combine all the sub-outputs to achieve this.
Here is my question, is there a simple way to achieve this in theano?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions