java icon indicating copy to clipboard operation
java copied to clipboard

NnOps topK not allowing variadic args for TopK.Options

Open zz-x404 opened this issue 5 months ago • 0 comments

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 https://github.com/tensorflow/java/blob/e9c854fba1e4c175de7cc8df0fb4185b09dab229/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java#L3109-L3131 that it currently accepts TopK.Options[] options

Describe the expected behavior It should accept variadic argument TopK.Options... options just like its variant https://github.com/tensorflow/java/blob/e9c854fba1e4c175de7cc8df0fb4185b09dab229/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/NnOps.java#L3154-L3157

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

zz-x404 avatar Jul 31 '25 17:07 zz-x404