diff --git a/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md b/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md index e46e35537382c8b7f3f47cb53f4bd17072a90385..48007f8c0d90495a27bc49ef01c3e0229c37f500 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md +++ b/zh-cn/application-dev/reference/apis/js-apis-mindSporeLite.md @@ -362,7 +362,7 @@ mindSporeLite.loadModelFromFd(file.fd).then((result) => { getInputs(): MSTensor[] -获取模型的输入用于推理。需要确保调用时模型对象不为空。 +获取模型的输入用于推理。 **系统能力:** SystemCapability.AI.MindSporeLite @@ -383,9 +383,9 @@ mindSporeLite.loadModelFromFile(model_file).then((result) => { ``` ### predict -predict(inputs: MSTensor[], callback: Callback<Model>): void +predict(inputs: MSTensor[], callback: Callback<MSTensor[]>): void -执行推理模型。使用callback异步回调。需要确保调用时模型对象不为空。 +执行推理模型。使用callback异步回调。需要确保调用时模型对象不被资源回收。 **系统能力:** SystemCapability.AI.MindSporeLite @@ -394,7 +394,7 @@ predict(inputs: MSTensor[], callback: Callback<Model>): void | 参数名 | 类型 | 必填 | 说明 | | ------ | ----------------------- | ---- | -------------------------- | | inputs | [MSTensor](#mstensor)[] | 是 | 模型的输入。MSTensor对象。 | -| callback | Callback<[Model](#model)> | 是 | 回调函数。返回模型对象。 | +| callback | Callback<[MSTensor](#mstensor)[]> | 是 | 回调函数。返回MSTensor对象。 | **示例:** @@ -420,7 +420,7 @@ syscontext.resourceManager.getRawFileContent(inputName).then((buffer) => { predict(inputs: MSTensor[]): Promise<MSTensor[]> -执行推理模型。使用Promise异步函数。需要确保调用时模型对象不为空。 +执行推理模型。使用Promise异步函数。需要确保调用时模型对象不被资源回收。 **系统能力:** SystemCapability.AI.MindSporeLite @@ -461,7 +461,7 @@ syscontext.resourceManager.getRawFileContent(inputName).then((buffer) => { resize(inputs: MSTensor[], dims: Array<Array<number>>): boolean -重新设置张量大小。需要确保调用时模型对象不为空。 +重新设置张量大小。 **系统能力:** SystemCapability.AI.MindSporeLite