train_image_classifier.py 文件源码

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

项目:isbi2017-part3 作者: learningtitans 项目源码 文件源码
def _get_variables_to_train():
  """Returns a list of variables to train.

  Returns:
    A list of variables to train by the optimizer.
  """
  if FLAGS.trainable_scopes is None:
    return tf.trainable_variables()
  else:
    scopes = [scope.strip() for scope in FLAGS.trainable_scopes.split(',')]

  variables_to_train = []
  for scope in scopes:
    variables = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope)
    variables_to_train.extend(variables)
  return variables_to_train
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号