densenet_model.py 文件源码

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

项目:tensorflow_face 作者: ZhihengCV 项目源码 文件源码
def transition_block(inputs, reduction, scope, is_training, keep_prob):
    """Call H_l composite function with 1x1 kernel and after average
    pooling
    """
    with tf.variable_scope(scope, 'trans1', [inputs]):
        # call composite function with 1x1 kernel
        out_features = int(int(inputs.get_shape()[-1]) * reduction)
        nets = slim.conv2d(inputs, out_features,
                           [1, 1], scope='conv')
        nets = slim.dropout(nets, keep_prob=keep_prob,
                            is_training=is_training,
                            scope='dropout')
        # run average pooling
        nets = slim.avg_pool2d(nets, [2, 2], scope='pool')
        return nets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号