name_scope和 variable_scope区别 Posted on 2018-02-Mon Edited on 2018-04-Sun Views: Views: 变量的全局名和variable_scope有关,和name_scope无关12345678910111213141516import tensorflow as tfv = tf.Variable( [2,2,3,32],name='weights')with tf.variable_scope('variable_scope'): v1 = tf.get_variable('weights', [2,2,3,32])with tf.name_scope('name_scope'): v2 = tf.get_variable('weights',[2,2,3,32])print v.nameprint v1.nameprint v2.name---weights:0variable_scope/weights:0weights_1:0