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:
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可以进行多种操作