当前位置:网站首页>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)指令设置并行工作器的默认数量
边栏推荐
猜你喜欢

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

C# wpf 无边框窗口添加阴影效果

MySql中@符号的使用

- daily a LeetCode 】 【 191. A number of 1

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

自然语言处理nltk

Swiper rotates pictures and plays background music

The advanced version of the cattle brushing series (search for rotating sorted arrays, inversion of the specified range in the linked list)

【Swords Offer】Swords Offer 17. Print n digits from 1 to the largest

Basic use of scrapy
随机推荐
谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构
牛客刷题系列之进阶版(组队竞赛,排序子序列,倒置字符串, 删除公共字符,修理牧场)
SimpleOSS third-party library libcurl and engine libcurl error solution
【网站放大镜效果】两种方式实现
Deepen school-enterprise cooperation and build an "overpass" for the growth of technical and skilled talents
Chapter 4 Controlling the Execution Flow
SwiftUI iOS Boutique Open Source Project Complete Baked Food Recipe App based on SQLite (tutorial including source code)
高精度加法
电脑死机的时候,发生了什么?
Hello, my new name is "Bronze Lock/Tongsuo"
启动前台Activity
What is a RESTful API?
【剑指 Offe】剑指 Offer 17. 打印从1到最大的n位数
VBA批量将Excel数据导入Access数据库
redis
The Meta metaverse division lost 2.8 billion in the second quarter!Still want to keep betting?Metaverse development has yet to see a way out!
6 yuan per catty, why do Japanese companies come to China to collect cigarette butts?
The advanced version of the Niu Ke brushing series (team competition, sorting subsequences, inverting strings, deleting common characters, repairing pastures)
【总结】1396- 60+个 VSCode 插件,打造好用的编辑器
What is the difference between a cloud database and an on-premises database?