Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
Describe the current behavior
In talking with @karllessard, we saw
|
/** |
|
* Finds values and indices of the {@code k} largest elements for the last dimension. |
|
* If the input is a vector (rank-1), finds the {@code k} largest entries in the vector |
|
* and outputs their values and indices as vectors. Thus {@code values[j]} is the |
|
* {@code j}-th largest entry in {@code input}, and its index is {@code indices[j]}. |
|
* <p>For matrices (resp. higher rank input), computes the top {@code k} entries in each |
|
* row (resp. vector along the last dimension). Thus, |
|
* <pre> |
|
* values.shape = indices.shape = input.shape[:-1] + [k] |
|
* </pre> |
|
* <p>If two elements are equal, the lower-index element appears first. |
|
* |
|
* @param input 1-D or higher with last dimension at least {@code k}. |
|
* @param k 0-D. Number of top elements to look for along the last dimension (along each |
|
* row for matrices). |
|
* @param options carries optional attribute values |
|
* @param <T> data type for {@code TopKV2} output and operands |
|
* @return a new instance of TopK, with default output types |
|
*/ |
|
public <T extends TNumber> TopK<T, TInt32> topK(Operand<T> input, Operand<? extends TNumber> k, |
|
TopK.Options[] options) { |
|
return TopK.create(scope, input, k, options); |
|
} |
that it currently accepts
TopK.Options[] options
Describe the expected behavior
It should accept variadic argument TopK.Options... options just like its variant
|
public <T extends TNumber, V extends TNumber> TopK<T, V> topK(Operand<T> input, |
|
Operand<? extends TNumber> k, Class<V> indexType, TopK.Options... options) { |
|
return TopK.create(scope, input, k, indexType, options); |
|
} |
Code to reproduce the issue
Calling tf.nn.topK(input, k) would be a method not found
Other info / logs
Method topK(org.tensorflow.op.core.Placeholder,org.tensorflow.op.core.Constant) cannot be found on type org.tensorflow.op.NnOps
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
Describe the current behavior
In talking with @karllessard, we saw
java/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java
Lines 3109 to 3131 in e9c854f
TopK.Options[] optionsDescribe the expected behavior
It should accept variadic argument
TopK.Options... optionsjust like its variantjava/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java
Lines 3154 to 3157 in e9c854f
Code to reproduce the issue
Calling
tf.nn.topK(input, k)would be a method not foundOther info / logs