当前位置:网站首页>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)指令设置并行工作器的默认数量
边栏推荐
- WEBSOCKETPP使用简介+demo
- SimpleOSS第三方库libcurl与引擎libcurl错误解决方法
- The large-scale application of artificial intelligence AI products in industrial-grade mature shipping ports of CIMC World Lianda will create a new generation of high-efficiency smart ports and innova
- 阿里云武林头条活动分享
- 监听开机广播
- MYSQL(基本篇)——一篇文章带你走进MYSQL的奇妙世界
- VBA connects Access database and Excel
- redis
- Vulkan开启特征(feature)的正确姿势
- Scrapy framework is introduced
猜你喜欢
电脑死机的时候,发生了什么?
运营 23 年,昔日“国内第一大电商网站”黄了...
kotlin的by lazy
6 yuan per catty, why do Japanese companies come to China to collect cigarette butts?
解决终极bug,项目最终能顺利部署上线。
C# wpf 无边框窗口添加阴影效果
Codeblocks + Widgets create window code analysis
Critical Reviews | 南农邹建文组综述全球农田土壤抗生素与耐药基因分布
SimpleOSS third-party library libcurl and engine libcurl error solution
Spark学习:用spark实现ETL
随机推荐
【总结】1396- 60+个 VSCode 插件,打造好用的编辑器
Scrapy framework is introduced
DM8: Single database and single instance to build a local data guard service
After 23 years of operation, the former "China's largest e-commerce website" has turned yellow...
【每日一道LeetCode】——191. 位1的个数
架构师如何成长
SimpleOSS third-party library libcurl and engine libcurl error solution
MySQL data types
Basic use of scrapy
C# wpf 无边框窗口添加阴影效果
MongoDB打破了原则引入SQL?
2种手绘风格效果比较,你更喜欢哪一种呢?
LeetCode Exercise - Two Questions About Finding Sum of Array Elements
natural language processing nltk
攻防世界web-Cat
VS Code 连接SQL Server
WeChat Mini Program Cloud Development | Urban Information Management
开心的聚餐
Common linked list problems and their Go implementation
监听开机广播