tf.get_variable() and tf.Variable()
前文Name Scope vs Variable Scope in TensorFlow比较了作用域variable_scope
和name_scope
在TensorFlow中如何共享变量,但是它们需要分别和tf.get_variable
和tf.Variable
搭配使用。一般情况下,tf.variable_scope
和tf.get_variable
和搭配使用,tf.name_scope
和tf.Variable
搭配使用。