networks.py 文件源码

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

项目:multi-gpu-keras-tf 作者: sallamander 项目源码 文件源码
def _conv_block(layer, num_conv_layers, num_filters):
        """Build a conv block on top of inputs

        :param inputs: Keras Layer object representing the VGG net up to this
         point
        :param num_conv_layers: int for the number of convolutional layers to
         include in this block
        :param num_filters: int for the number of filters per convolutional
         layer
        """

        for _ in  range(num_conv_layers - 1):
            layer = Conv2D(
                filters=num_filters, kernel_size=(3, 3), padding='same',
                activation='relu'
            )(layer)
        layer = MaxPooling2D(pool_size=(2, 2), strides=(2, 2))(layer)

        return layer
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号