未验证 提交 66fbd1db 编写于 作者: O openharmony_ci 提交者: Gitee

!21169 新增模型异步调用时使用约束描述

Merge pull request !21169 from fangzhou0329/master
...@@ -362,7 +362,7 @@ mindSporeLite.loadModelFromFd(file.fd).then((result) => { ...@@ -362,7 +362,7 @@ mindSporeLite.loadModelFromFd(file.fd).then((result) => {
getInputs(): MSTensor[] getInputs(): MSTensor[]
获取模型的输入用于推理。 获取模型的输入用于推理。需要确保调用时模型对象不为空。
**系统能力:** SystemCapability.AI.MindSporeLite **系统能力:** SystemCapability.AI.MindSporeLite
...@@ -385,7 +385,7 @@ mindSporeLite.loadModelFromFile(model_file).then((result) => { ...@@ -385,7 +385,7 @@ mindSporeLite.loadModelFromFile(model_file).then((result) => {
predict(inputs: MSTensor[], callback: Callback<Model>): void predict(inputs: MSTensor[], callback: Callback<Model>): void
执行推理模型。使用callback异步回调。 执行推理模型。使用callback异步回调。需要确保调用时模型对象不为空。
**系统能力:** SystemCapability.AI.MindSporeLite **系统能力:** SystemCapability.AI.MindSporeLite
...@@ -420,7 +420,7 @@ syscontext.resourceManager.getRawFileContent(inputName).then((buffer) => { ...@@ -420,7 +420,7 @@ syscontext.resourceManager.getRawFileContent(inputName).then((buffer) => {
predict(inputs: MSTensor[]): Promise<MSTensor[]> predict(inputs: MSTensor[]): Promise<MSTensor[]>
执行推理模型。使用Promise异步函数。 执行推理模型。使用Promise异步函数。需要确保调用时模型对象不为空。
**系统能力:** SystemCapability.AI.MindSporeLite **系统能力:** SystemCapability.AI.MindSporeLite
...@@ -461,7 +461,7 @@ syscontext.resourceManager.getRawFileContent(inputName).then((buffer) => { ...@@ -461,7 +461,7 @@ syscontext.resourceManager.getRawFileContent(inputName).then((buffer) => {
resize(inputs: MSTensor[], dims: Array<Array<number>>): boolean resize(inputs: MSTensor[], dims: Array<Array<number>>): boolean
重新设置张量大小。 重新设置张量大小。需要确保调用时模型对象不为空。
**系统能力:** SystemCapability.AI.MindSporeLite **系统能力:** SystemCapability.AI.MindSporeLite
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册