@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.InTopKV2 extends Pointer
K predictions.
This outputs a batch_size bool array, an entry out[i] is true if the
prediction for the target class is among the top k predictions among
all predictions for example i. Note that the behavior of InTopK differs
from the TopK op in its handling of ties; if multiple classes have the
same prediction value and straddle the top-k boundary, all of those
classes are considered to be in the top k.
More formally, let
\\(predictions_i\\) be the predictions for all classes for example i,
\\(targets_i\\) be the target class for example i,
\\(out_i\\) be the output for example i,
$$out_i = predictions_{i, targets_i} \in TopKIncludingTies(predictions_i)$$
Arguments:
* scope: A Scope object
* predictions: A batch_size x classes tensor.
* targets: A batch_size vector of class ids.
* k: Number of top elements to look at for computing precision.
Returns:
* Output: Computed precision at k as a bool Tensor.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
InTopKV2(Pointer p)
Pointer cast constructor.
|
InTopKV2(tensorflow.Scope scope,
tensorflow.Input predictions,
tensorflow.Input targets,
tensorflow.Input k) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.InTopKV2 |
operation(tensorflow.Operation operation) |
tensorflow.Output |
precision() |
tensorflow.InTopKV2 |
precision(tensorflow.Output precision) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic InTopKV2(Pointer p)
Pointer.Pointer(Pointer).public InTopKV2(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input predictions, @ByVal tensorflow.Input targets, @ByVal tensorflow.Input k)
@ByVal @Name(value="operator tensorflow::Output") public tensorflow.Output asOutput()
@ByVal @Name(value="operator tensorflow::Input") public tensorflow.Input asInput()
public tensorflow.Node node()
@ByRef public tensorflow.Operation operation()
public tensorflow.InTopKV2 operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output precision()
public tensorflow.InTopKV2 precision(tensorflow.Output precision)
Copyright © 2019. All rights reserved.