Skip to content

Commit ccb8634

Browse files
committed
tf.group SciSharp#396
1 parent 060cc37 commit ccb8634

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/TensorFlowNET.Core/APIs/tf.control.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ public Tensor cond(Tensor pred,
2727
string name = null)
2828
=> control_flow_ops.cond(pred, true_fn, false_fn, strict: strict, name: name);
2929

30+
/// <summary>
31+
/// Create an op that groups multiple operations.
32+
/// </summary>
33+
/// <typeparam name="T"></typeparam>
34+
/// <param name="inputs"></param>
35+
/// <param name="name"></param>
36+
/// <returns>An Operation that executes all its inputs.</returns>
37+
public Operation group<T>(T[] inputs, string name = null) where T : ITensorOrOperation
38+
=> control_flow_ops.group(inputs, name: name);
39+
3040
public Tensor while_loop(Func<Tensor, Tensor> cond, Func<Tensor, Tensor> body, Tensor[] loop_vars,
3141
TensorShape shape_invariants = null,
3242
int parallel_iterations = 10,

0 commit comments

Comments
 (0)