335 Star 1.5K Fork 858

MindSpore / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
msconfig.md 3.55 KB
一键复制 编辑 原始数据 按行查看 历史
宦晓玲 提交于 2023-07-21 15:10 . modify the md links in 1.2

MSConfig

查看源文件

import com.mindspore.lite.config.MSConfig;

MSConfig类用于保存执行中的配置变量。

公有成员函数

function
boolean init(int deviceType, int threadNum, int cpuBindMode, boolean enable_float16)
boolean init(int deviceType, int threadNum, int cpuBindMode)
boolean init(int deviceType, int threadNum)
boolean init(int deviceType)
boolean init()
void free()

init

public boolean init(int deviceType, int threadNum, int cpuBindMode, boolean enable_float16)

初始化MSConfig。

public boolean init(int deviceType, int threadNum, int cpuBindMode)

初始化MSConfig,enable_float16默认为false。

public boolean init(int deviceType, int threadNum)

初始化MSConfig,cpuBindMode默认为CpuBindMode.MID_CPUenable_float16默认为false。

public boolean init(int deviceType)

初始化MSConfig,cpuBindMode默认为CpuBindMode.MID_CPUthreadNum默认为2enable_float16默认为false。

public boolean init()

初始化MSConfig,deviceType默认为DeviceType.DT_CPUcpuBindMode默认为CpuBindMode.MID_CPUthreadNum默认为2enable_float16默认为false。

  • 返回值

    初始化是否成功。

free

public void free()

释放MSConfig运行过程中动态分配的内存。LiteSession init之后即可释放。

1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r1.2

搜索帮助