AscendLinearTransform

API Definition

explicit AscendLinearTransform(int dimIn = 0, int dimOut = 0, bool haveBias = false, AscendVectorTransformConfig config = AscendVectorTransformConfig())

Function

Constructor of AscendLinearTransform, which configures corresponding parameters.

Input

int dimIn: input dimension of VectorTransform.

int dimOut: output dimension of VectorTransform.

bool haveBias: whether to add the bias offset.

AscendVectorTransformConfig: configuration parameter of VectorTransform.

Output

N/A

Return Value

N/A

Restrictions

dinIn∈{32, 64, 128, 256, 384, 512, 1024}

dinOut∈{32, 64, 128, 256, 384, 512, 1024}

The values of dimIn and dimOut need to be the same as those of Faiss because of forward compatibility, and retain the default value 0. The dimension cannot be 0 during program running.