tensorflow tf.group

来源:互联网 发布:飞狐 指标数据输出 编辑:程序博客网 时间:2024/06/07 02:35
group(*inputs, **kwargs)
Create an op that groups multiple operations.
When this op finishes, all ops in input have finished. This op has no output.
See also tuple and with_dependencies.


Args:
*inputs: One or more tensors to group.
**kwargs: Optional parameters to pass when constructing the NodeDef.
name: A name for this operation (optional).


Returns:

An Operation that executes all its inputs.


b = tf.random_uniform([2,3], minval = 10, maxval = 11)w = tf.random_uniform([2,3], minval = 10, maxval = 11)mul = tf.multiply(w, 2)add = tf.add(w, 2)group = tf.group(mul, add)print sess.run(group)

输出:None


分析:如上面的代码段所示,group可以进行多种操作

原创粉丝点击