Function: set_1n_top_num

C Prototype

aclError aclfvSet1NTopNum(aclfvInitPara *initPara, uint32_t maxTopNumFor1N)

Python Function

ret = acl.fv.set_1n_top_num(init_para, max_top_num_for_1n)

Function Usage

Sets the maximum number of results (maximum topk) returned in the 1:N search mode. If it is not set, top 4800 results are returned by default.

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Input Description

  • init_para: int, initialization parameter for feature vector search.

    Call acl.fv.create_init_para to create data of the aclfvInitPara type in advance.

  • max_top_num_for_1n: int, maximum number of results (maximum topk) returned in the 1:N search mode. Must be in the range of [2, 4800].

Return Value

ret: int, error code.

Restrictions

None