ApproxTopK.Options

public static class ApproxTopK.Options

Optional attributes for ApproxTopK

Public Methods

ApproxTopK.Options
aggregateToTopk(Boolean aggregateToTopk)
ApproxTopK.Options
isMaxK(Boolean isMaxK)
ApproxTopK.Options
recallTarget(Float recallTarget)
ApproxTopK.Options
reductionDimension(Long reductionDimension)
ApproxTopK.Options
reductionInputSizeOverride(Long reductionInputSizeOverride)

Inherited Methods

Public Methods

public ApproxTopK.Options aggregateToTopk (Boolean aggregateToTopk)

Parameters
aggregateToTopk When true, aggregates approximate results to top-k. When false, returns the approximate results. The number of the approximate results is implementation defined and is greater equals to the specified `k`.

public ApproxTopK.Options isMaxK (Boolean isMaxK)

Parameters
isMaxK When true, computes max-k; otherwise computes min-k.

public ApproxTopK.Options recallTarget (Float recallTarget)

Parameters
recallTarget Recall target for the approximation. Range in (0,1]

public ApproxTopK.Options reductionDimension (Long reductionDimension)

Parameters
reductionDimension Integer dimension along which to search. Default: -1.

public ApproxTopK.Options reductionInputSizeOverride (Long reductionInputSizeOverride)

Parameters
reductionInputSizeOverride When set to a positive value, it overrides the size determined by `input[reduction_dim]` for evaluating the recall. This option is useful when the given `input` is only a subset of the overall computation in SPMD or distributed pipelines, where the true input size cannot be deferred by the `input` shape.