lenet_v1.py 文件源码

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

项目:num-seq-recognizer 作者: gmlove 项目源码 文件源码
def fc_layers(net,
              scope,
              end_points_collection,
              num_classes=10,
              is_training=True,
              dropout_keep_prob=0.5,
              name_prefix=None):

  def full_scope_name(scope_name):
    return scope_name if name_prefix is None else '%s_%s' % (name_prefix, scope_name)

  with slim.arg_scope([slim.fully_connected, slim.dropout],
                      outputs_collections=[end_points_collection]):
    '''
    with droupout accuracy: 0.68, data: 4.2M
    without droupout accuracy: 0.71, data: 4.2M
    '''
    # net = slim.dropout(net, dropout_keep_prob, is_training=is_training,
    #                    scope=full_scope_name('dropout3'))
    net = slim.fully_connected(net, num_classes, activation_fn=None,
                               scope=full_scope_name('fc4'))

  return net, end_points_collection
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号