Skip to content

Commit 098f597

Browse files
Add tf.nn.in_top_k
1 parent caeb0e3 commit 098f597

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ public static Tensor[] fused_batch_norm(Tensor x,
131131
public static Tensor max_pool(Tensor value, int[] ksize, int[] strides, string padding, string data_format = "NHWC", string name = null)
132132
=> nn_ops.max_pool(value, ksize, strides, padding, data_format: data_format, name: name);
133133

134+
public static Tensor in_top_k(Tensor predictions, Tensor targets, int k, string name = "InTopK") => gen_ops.in_top_k(predictions, targets, k, name);
135+
134136
public static Tensor[] top_k(Tensor input, int k = 1, bool sorted = true, string name = null)
135137
=> gen_nn_ops.top_kv2(input, k: k, sorted: sorted, name: name);
136138

0 commit comments

Comments
 (0)