def _block_output(net, endpoints, num_classes=1000, dropout_keep_prob=0.5, scope='Output'):
with tf.variable_scope(scope):
# 8 x 8 x 1536
shape = net.get_shape()
net = layers.avg_pool2d(net, shape[1:3], padding='VALID', scope='Pool1_Global')
endpoints['Output/Pool1'] = net
# 1 x 1 x 1536
net = layers.dropout(net, dropout_keep_prob)
net = layers.flatten(net)
# 1536
net = layers.fully_connected(net, num_classes, activation_fn=None, scope='Logits')
# num classes
endpoints['Logits'] = net
return net
build_inception_v4.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录