resXception.py 文件源码

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

项目:face-to-emotion 作者: mhw32 项目源码 文件源码
def ResXceptionBlock(input, size):
    # residual component
    r = Conv2D(size, (1, 1), strides=(2, 2),
               padding='same', use_bias=False)(input)
    r = BatchNormalization()(r)
    # depth-wise separable conv
    x = SeparableConv2D(size, (3, 3), padding='same',
                        kernel_regularizer=l2(0.01),
                        use_bias=False)(input)
    x = BatchNormalization()(x)
    x = Activation('relu')(x)
    x = SeparableConv2D(size, (3, 3), padding='same',
                        kernel_regularizer=l2(0.01),
                        use_bias=False)(x)
    x = BatchNormalization()(x)
    x = MaxPooling2D((3, 3), strides=(2, 2), padding='same')(x)
    # sum the two components
    output = add([x, r])
    return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号