tensorflow的名称域的声明有两种方式:
1)tf.name_scope("scope_name"):
2)tf.variable_scope("scope_name"):
定义变量有两种方式:
1)tf.Variable()#变量名可选
2)tf.get_variable()#变量名必选
在variable_scope名称域中定义变量,则两种变量定义都是一样的
在name_scope中使用get_variable()定义,则是先判断当前是否有该tensor,如果没有则创建变量
,如果有那么直接返回该tensor,在tensor名字前不会加scope_name.