MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / addTopK

Method addTopK

include/NvInfer.h:7358–7361  ·  view source on GitHub ↗

\brief Add a TopK layer to the network. The TopK layer has two outputs of the same dimensions. The first contains data values, the second contains index positions for the values. Output values are sorted, largest first for operation kMAX and smallest first for operation kMIN. Currently only values of K up to 3840 are supported. \param input The input tensor to the layer. \param op Operation to

Source from the content-addressed store, hash-verified

7356 //! \return The new TopK layer, or nullptr if it could not be created.
7357 //!
7358 ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept
7359 {
7360 return mImpl->addTopK(input, op, k, reduceAxes);
7361 }
7362
7363 //!
7364 //! \brief Add gather with mode GatherMode::kDEFAULT and specified axis and nbElementWiseDims=0.

Callers 1

constructNetworkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected