densenet_model.py 文件源码

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

项目:tensorflow_face 作者: ZhihengCV 项目源码 文件源码
def densenet_inference(inputs, is_training, keep_prob, growth_rate, reduction):

    first_output_fea = growth_rate * 2

    nets = slim.conv2d(inputs, first_output_fea,
                       [5, 5], scope='conv0')
    nets = slim.max_pool2d(nets, [3, 3], padding='SAME', scope='pool0')  # 56*48*64

    nets = densenet_block(nets, 6, growth_rate, True,
                          'block1', is_training, keep_prob)
    nets = transition_block(nets, reduction, 'trans1', is_training, keep_prob)  # 28*24*256

    nets = densenet_block(nets, 12, growth_rate, True,
                          'block2', is_training, keep_prob)
    nets = transition_block(nets, reduction, 'trans2', is_training, keep_prob)  # 14*12*640

    nets = densenet_block(nets, 24, growth_rate, True,
                          'block3', is_training, keep_prob)
    nets = transition_block(nets, reduction, 'trans3', is_training, keep_prob)  # 7*6*1408

    nets = densenet_block(nets, 16, growth_rate, True,
                          'block4', is_training, keep_prob)  # 7*6*1920
    nets = slim.avg_pool2d(nets, [7, 6], scope='pool4')  # 1*1*1920
    return nets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号