TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
polygraphy.comparator.postprocess.PostprocessFunc Class Reference
Inheritance diagram for polygraphy.comparator.postprocess.PostprocessFunc:
Collaboration diagram for polygraphy.comparator.postprocess.PostprocessFunc:

Static Public Member Functions

def topk_func (k=10, axis=-1, outputs=None, exclude=None)
 

Detailed Description

Provides functions that can apply post-processing to `IterationResult` s.

Member Function Documentation

◆ topk_func()

def polygraphy.comparator.postprocess.PostprocessFunc.topk_func (   k = 10,
  axis = -1,
  outputs = None,
  exclude = None 
)
static
Creates a function that applies a Top-K operation to a IterationResult.
Top-K will return the indices of the k largest values in the array.

Args:
    k (int):
    The number of indices to keep.
    If this exceeds the axis length, it will be clamped.
    Defaults to 10.
    axis (int):
    The axis along which to apply the topk.
    Defaults to -1.
    outputs (Sequence[str]):
    Names of outputs to apply top-k to.
    Defaults to all outputs.
    exclude (Sequence[str]):
    Names of outputs to exclude. Top-K will not be applied to these outputs.

Returns:
    Callable(IterationResult) -> IterationResult: The top-k function.

The documentation for this class was generated from the following file: