Theano中卷积神经网络的无监督预训练

Sha*_*hai 37 python neural-network unsupervised-learning theano deep-learning

我想设计一个带有一个(或多个)卷积层(CNN)和一个或多个完全连接的隐藏层的深网.
对于具有完全连接层的深度网络,在无人监督的预训练中有一些方法,例如,使用去噪自动编码器RBM.

我的问题是:我如何实现(在theano中)卷积层的无监督预训练阶段?

我不希望完整的实现作为答案,但我希望链接到一个好的教程或可靠的参考.

小智 30

本文描述了一种构建堆叠卷积自动编码器的方法.根据该论文和一些谷歌搜索,我能够实现所描述的网络.基本上,您需要的一切都在Theano卷积网络和去噪自动编码器教程中描述,但有一个关键的例外:如何反转卷积网络中的最大池化步骤.我能够使用本讨论中的方法解决这个问题 - 最棘手的部分是确定W_prime的正确尺寸,因为这些将取决于前馈滤波器大小和汇集比率.这是我的反转功能:

    def get_reconstructed_input(self, hidden):
        """ Computes the reconstructed input given the values of the hidden layer """
        repeated_conv = conv.conv2d(input = hidden, filters = self.W_prime, border_mode='full')

        multiple_conv_out = [repeated_conv.flatten()] * np.prod(self.poolsize)

        stacked_conv_neibs = T.stack(*multiple_conv_out).T

        stretch_unpooling_out = neibs2images(stacked_conv_neibs, self.pl, self.x.shape)

        rectified_linear_activation = lambda x: T.maximum(0.0, x)
        return rectified_linear_activation(stretch_unpooling_out + self.b_prime.dimshuffle('x', 0, 'x', 'x'))
Run Code Online (Sandbox Code Playgroud)

  • @senecaur由于似乎有兴趣使用堆叠卷积自动编码器和afaik在互联网上找不到实现,你介意分享/发布你的实现吗? (2认同)