Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3126,7 +3126,7 @@ public <T extends TNumber> SparseSoftmaxCrossEntropyWithLogits<T> sparseSoftmaxC
* @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) {
TopK.Options... options) {
return TopK.create(scope, input, k, options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static <T extends TNumber, V extends TNumber> TopK<T, V> create(Scope sco
describeByClass = true
)
public static <T extends TNumber> TopK<T, TInt32> create(Scope scope, Operand<T> input,
Operand<? extends TNumber> k, Options[] options) {
Operand<? extends TNumber> k, Options... options) {
return create(scope, input, k, TInt32.class, options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ enum RenderMode {

/**
* The generated options class, or null if it doesn't have one or {@link #buildOptionsClass()} has
* not been ran.
* not been run.
*/
private TypeSpec optionsClass = null;

Expand Down Expand Up @@ -748,6 +748,10 @@ private void buildSecondaryFactory(
body.add("$T.class", defaultTypes.get(attr));
} else {
factoryBuilder.addParameter(param);
// Checking if the parameter being added is the variadic options or not
if (param.name.equals("options")) {
factoryBuilder.varargs();
}
factoryBuilder.addJavadoc("\n@param $L $L", param.name, paramTags.get(param.name));
typeVars.addAll(new ResolvedType(param.type).findGenerics());
body.add("$L", param.name);
Expand Down
Loading