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

2024-04-25 21:50:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我想设计一个深网,上面有一个(或多个)卷积层(CNN)和一个或多个完全连接的隐藏层。
对于具有完全连接层的深层网络,在ano中有用于无监督预训练的方法,例如,使用denoising auto-encodersRBMs

我的问题是:如何为卷积层实现无监督的预训练阶段?

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


Tags: 方法答案网络auto链接教程阶段卷积
1条回答
网友
1楼 · 发布于 2024-04-25 21:50:26

This paper描述了一种构建堆叠卷积自动编码器的方法。基于这篇论文和一些谷歌搜索,我能够实现所描述的网络。基本上,您所需要的一切都将在无卷积网络和去噪自动编码器教程中描述,但有一个关键的例外:如何在卷积网络中反转最大池步骤。我能够用this discussion中的一个方法计算出这个问题——最棘手的部分是为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'))

相关问题 更多 >