build_resnet.py 文件源码

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

项目:tensorflow-litterbox 作者: rwightman 项目源码 文件源码
def _output(net, endpoints, num_classes, pre_act=False):
    with tf.variable_scope('Output'):
        if pre_act:
            net = layers.batch_norm(net, activation_fn=tf.nn.relu)
        shape = net.get_shape()
        net = layers.avg_pool2d(net, shape[1:3], scope='Pool1_Global')
        endpoints['OutputPool1'] = net
        net = layers.flatten(net)
        net = layers.fully_connected(net, num_classes, activation_fn=None, scope='Logits')
        endpoints['Logits'] = net
        # num_classes
    return net
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号