network.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:python-machine-learning 作者: sho-87 项目源码 文件源码
def set_inpt(self, inpt, inpt_dropout, mini_batch_size):
        # Reshape the input to 2D
        self.inpt = inpt.reshape(self.image_shape)

        # Do convolution
        self.conv_out = conv2d(
            input=self.inpt, filters=self.w, filter_shape=self.filter_shape,
            input_shape=self.image_shape, border_mode=self.border_mode,
            subsample=self.stride)

        # Get the feature maps for this layer
        self.feature_maps = theano.function([self.inpt], self.conv_out)

        # Apply bias and activation and set as output
        self.output = self.activation_fn(
            self.conv_out + self.b.dimshuffle('x', 0, 'x', 'x'))
        self.output_dropout = self.output # no dropout in convolutional layers
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号