Do cosine similarity calculation of tensors to describe the fitness between text and images in clip model
npm install capacitor-plugin-tflite-cosines-calc
npx cap syncecho(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
|---|---|
options |
{ value: string; } |
Returns: Promise<{ value: string; }>
loadTensorFromDB(options: { emptyArg: number; }) => Promise<void>| Param | Type |
|---|---|
options |
{ emptyArg: number; } |
offloadTensor(options: { emptyArg: number; }) => Promise<void>| Param | Type |
|---|---|
options |
{ emptyArg: number; } |
calculateCosineSimilarity(options: { tensorArray: number[]; }) => Promise<{ prob: number[]; }>| Param | Type |
|---|---|
options |
{ tensorArray: number[]; } |
Returns: Promise<{ prob: number[]; }>