在这个program中,有一个代码段
with tf.variable_scope(_DECODER_SCOPE, _DECODER_SCOPE, [features]):
feature_list = feature_extractor.networks_to_feature_maps[
model_variant][feature_extractor.DECODER_END_POINTS]
if feature_list is None:
tf.logging.info('Not found any decoder end points.')
return features
else:我不清楚如何理解有这三个参数的tf.variable_scope,它是用来做什么的,为什么我们在参数列表中需要两个_DECODER_SCOPE?
发布于 2018-06-12 05:02:26
第二个argument to variable_scope是一个“默认”名称,它是唯一的(通过附加一个数字)。但它仅在第一个参数为None时使用,因此我认为该行等同于:
with tf.variable_scope('decoder', values=[features]):
即打开名为'decoder'的variable_scope。The values argument to variable_scope is explained in this answer.
https://stackoverflow.com/questions/50686354
复制相似问题