Contents

applyTopK(k:input:bestValues:bestIndices:axis:batchSize:filterParameters:)

Applies a top-k filter directly to an input.

Declaration

static func applyTopK(k: Int, input: BNNSNDArrayDescriptor, bestValues: BNNSNDArrayDescriptor, bestIndices: BNNSNDArrayDescriptor, axis: Int, batchSize: Int, filterParameters: BNNSFilterParameters? = nil) throws

Parameters

  • k:

    The number of entries the operation finds.

  • input:

    The descriptor of the input.

  • bestValues:

    The descriptor of the k best values generated by the operation.

  • bestIndices:

    The descriptor of the indices of the k best values generated by the operation.

  • axis:

    The axis along which the operation finds top-k entries.

  • batchSize:

    The number of input-output pairs to process.

  • filterParameters:

    The filter runtime parameters.

Discussion

See Also

Related Documentation

Top-k layers