Understand on the tf.variable_scope and tf.name_scope
来源:互联网 发布:mac上怎么切换输入法 编辑:程序博客网 时间:2024/05/22 04:43
Recent two weeks, I have spent much time on learning Tensorflow to implement my idea. Here, I would like to give some diferences between tf.variable_scope and tf.name_scope. Totally, these two method can summarize some basics operations into one node and show a clear graph visualized by TensorBoard. Next, I would like to highlight their differences.
First, we usually use the manner like w= tf.Variable(dtype=tf.float32, shape=[784, 10])) to define the variable w. Actually, the tensorflow would give a specific name for this variable in their graph, sometimes maybe like variable_1, variable_2, and so on like these. Occasionally, we would also like to define the w like this: w= tf.Variable(dtype=tf.float32, shape=[784, 10]), name=’w’). I think all these name methods are just for the compact visualization in the Tensorboard. In the same name_scope, variables with the same name would not allowed to be created andalso TF gives the errors.
Second, if the tf.variable_scope is used, the name of the variable would automatically be added a prefix with the variable scope name. In this regard, variables with the same names specified in the declaration would be fine, because a different variable scope name is added as their prefix.
Sometimes, we don’t not need to specify the variable name by the declaration, otherwise for reuse, which is another question and would be discussed when required in my future works.
- Understand on the tf.variable_scope and tf.name_scope
- tf.name_scope and tf.variable_scope
- tf.get_variable tf.variable_scope tf.name_scope
- tf.variable_scope和tf.name_scope的用法
- tf.variable_scope与tf.name_scope不同之处
- tf.get_variable() vs tf.Variable(),tf.name_scope() vs tf.variable_scope()
- tf.get_variable() vs tf.Variable(),tf.name_scope() vs tf.variable_scope()
- tensorflow variable_scope,tf.name_scope, tf.variable, tf.get_varible
- TensorFlow 学习(一)—— tf.get_variable() vs tf.Variable(),tf.name_scope() vs tf.variable_scope()
- tensorflow的共享变量,tf.Variable(),tf.get_variable(),tf.Variable_scope(),tf.name_scope()联系与区别:
- tensorflow的共享变量,tf.Variable(),tf.get_variable(),tf.Variable_scope(),tf.name_scope()联系与区别
- tensorflow的共享变量,tf.Variable(),tf.get_variable(),tf.Variable_scope(),tf.name_scope()联系与区别
- 彻底弄懂tf.Variable、tf.get_variable、tf.variable_scope以及tf.name_scope异同
- tensorflow学习之路(2-1):tf.variable_scope(), tf.name_scope(), tf.get_variable()的认识
- tensorflow学习之路(2-2):tf.variable_scope(),tf.name_scope(),tf.get_variable()的认识(补充)
- tf.name_scope&tf.variable scope
- tf.get_variable 和tf.variable_scope
- tf.get_variable 和tf.variable_scope
- 下跌尽头线
- Angular购物车
- 多方炮
- 计算机二级c随笔一
- shoppingcart基础页面
- Understand on the tf.variable_scope and tf.name_scope
- linux后台工作放入以及调出
- 面试题
- web最基础知识点
- 刷CCF的算法题(第八天)
- UML类图
- C#关键字快速回想
- Ac自动机模板代码
- Android攻城狮的第二门课(第3季)第1章 数据存储之SharedPreferences