Skip to content

Commit

Permalink
Add tf.nn.in_top_k
Browse files Browse the repository at this point in the history
Add tf.nn.in_top_k
  • Loading branch information
Nucs authored Aug 18, 2019
2 parents caeb0e3 + babfb02 commit 9d52c9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TensorFlowNET.Core/APIs/tf.nn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ public static Tensor[] fused_batch_norm(Tensor x,
public static Tensor max_pool(Tensor value, int[] ksize, int[] strides, string padding, string data_format = "NHWC", string name = null)
=> nn_ops.max_pool(value, ksize, strides, padding, data_format: data_format, name: name);

public static Tensor in_top_k(Tensor predictions, Tensor targets, int k, string name = "InTopK")
=> gen_ops.in_top_k(predictions, targets, k, name);

public static Tensor[] top_k(Tensor input, int k = 1, bool sorted = true, string name = null)
=> gen_nn_ops.top_kv2(input, k: k, sorted: sorted, name: name);

Expand Down

0 comments on commit 9d52c9e

Please sign in to comment.