除了tf.control_dependencies作为上下文管理器(即与Python一起使用with)之外,tf.group和之间的区别是tf.control_dependencies什么?
什么时候应该使用?
它tf.group没有任何特定的操作顺序吗?我假设tf.group([op_1, op_2, op_3])在列表的顺序中执行ops,但也许情况并非如此?docstring不指定行为.
Yar*_*tov 16
如果你看一下graphdef,c=tf.group(a, b)会产生与图相同的图形
with tf.control_dependencies([a, b]):
c = tf.no_op()
Run Code Online (Sandbox Code Playgroud)
运行操作没有特定的顺序,TensorFlow会尽快(即并行)尝试执行操作.
| 归档时间: |
|
| 查看次数: |
6335 次 |
| 最近记录: |