当前位置:网站首页>MindSpore:Cifar10Dataset‘s num_workers=8, this value is not within the required range of [1, cpu_thr
MindSpore:Cifar10Dataset‘s num_workers=8, this value is not within the required range of [1, cpu_thr
2022-07-30 19:04:00 【小乐快乐】
问题描述:
Cifar10Dataset's num_workers=8, this value is not within the required range of [1, cpu_thr这个有办法解决吗?
解决方案:
试着设置为4或者3,2试试。
this value is not within the required range of [1, cpu_thread_cnt=4] 这应该是CPU只有4个线程,但是设置了8个,超过了实际硬件提供的,所以报错。
这里data_set = ds.Cifar10Dataset(dataset_path, num_parallel_workers=1, shuffle=True)
这里
data_set = data_set.map(operations=type_cast_op, input_columns="label", num_parallel_workers=1)
data_set = data_set.map(operations=trans, input_columns="image", num_parallel_workers=1)
需要ds.config.set_num_parallel_workers(4)指令设置并行工作器的默认数量
边栏推荐
- 还有三天忙完
- 【PHPWord】PHPOffice 套件之PHPWord快速入门
- 【剑指 Offe】剑指 Offer 17. 打印从1到最大的n位数
- The problem of writing go run in crontab does not execute
- SimpleOSS third-party library libcurl and engine libcurl error solution
- 2种手绘风格效果比较,你更喜欢哪一种呢?
- 中集世联达工业级成熟航运港口人工智能AI产品规模化应用,打造新一代高效能智慧港口和创新数字港口,全球港航人工智能能领军者中集飞瞳
- DM8:单库单实例搭建本地数据守护服务
- natural language processing nltk
- 自然语言处理nltk
猜你喜欢

解决终极bug,项目最终能顺利部署上线。

中集世联达飞瞳全球工业人工智能AI领军者,全球顶尖AI核心技术高泛化性高鲁棒性稀疏样本持续学习,工业级高性能成熟AI产品规模应用

Mysql执行原理剖析

【PHPWord】PHPOffice 套件之PHPWord快速入门

WeChat Mini Program Cloud Development | Urban Information Management

Scrapy framework is introduced

深入浅出边缘云 | 3. 资源配置

部分分类网络性能对比

基于inquirer封装一个控制台文件选择器

Meta元宇宙部门第二季度亏损28亿!仍要继续押注?元宇宙发展尚未看到出路!
随机推荐
Difference between Object and Map
Critical Reviews | A review of the global distribution of antibiotics and resistance genes in farmland soil by Nannong Zou Jianwen's group
Deepen school-enterprise cooperation and build an "overpass" for the growth of technical and skilled talents
Go system collection
Immersive experience iFLYTEK 2022 Consumer Expo "Official Designated Product"
MySQL data types
crontab中写go run不执行的问题
AWS console
浅聊对比学习(Contrastive Learning)第一弹
【刷题篇】计算质数
《痞子衡嵌入式半月刊》 第 59 期
[TypeScript]编译配置
Another company interview
LeetCode Exercise - Two Questions About Finding Sum of Array Elements
跨进程启动后台服务
golang日志库zerolog使用记录
Hello, my new name is "Bronze Lock/Tongsuo"
The advanced version of the Niu Ke brushing series (team competition, sorting subsequences, inverting strings, deleting common characters, repairing pastures)
DM8:单库单实例搭建本地数据守护服务
第14章 类型信息