当前位置:网站首页>MindSpore:对image作normalize的目的是什么?
MindSpore:对image作normalize的目的是什么?
2022-07-30 19:04:00 【小乐快乐】
问题描述:
normalize的目的是什么?
为什么要有两次rescale呢?一次rescale=1/255 还有一次rescale_nml =1/0.3081,这两次为什么不合并起来呢?shift也是同样的问题
这里的rescale_nml=1/0.3081和下面shift_nml=-1*0.1307/0.3081,这里的小数0.3081和0.3081是怎么得出的呢?
目前还有一个问题,就是这个MNIST的数据集,它的标准差和均值是怎么算出来的呢?
解决方案:
在咱们MindSpore官网中有教程示例,解释了对图片数据操作的目的,给您参考,如果有使用上的问题,欢迎继续提问。
实现一个图片分类应用 — MindSpore master documentation
rescale:一般用于将[0, 255]的取值归一化至 [0.0, 1.0]
normalize: 一般用于图像标准化,公式为:
你上面代码的意思:
// 标准化: 0.3081是标准差,0.1307是均值
// 归一化至 [0.0, 1.0]
关于更多标准化的知识,你可以参考如下:
CNN 入门讲解:什么是标准化(Normalization)? - 知乎
我理解这个是数据本身提供/组织/个人已经计算出来了,然后大家就这样用了。
因为只要数据集确定,这个均值 & 标准差 就不会再变了。
边栏推荐
- 中集世联达工业级成熟航运港口人工智能AI产品规模化应用,打造新一代高效能智慧港口和创新数字港口,全球港航人工智能能领军者中集飞瞳
- Codeblocks + Widgets create window code analysis
- The use of terminal split screen tool Terminalx
- Golang logging library zerolog use record
- 高并发秒杀项目总结
- NC | Tao Liang Group of West Lake University - TMPRSS2 "assists" virus infection and mediates the host invasion of Clostridium sothrix hemorrhagic toxin...
- After 23 years of operation, the former "China's largest e-commerce website" has turned yellow...
- LeetCode每日一题(1717. Maximum Score From Removing Substrings)
- VBA 连接Access数据库和Excle
- 6 yuan per catty, why do Japanese companies come to China to collect cigarette butts?
猜你喜欢
VBA 连接Access数据库和Excle
Basic use of scrapy
SimpleOSS第三方库libcurl与引擎libcurl错误解决方法
阿里云武林头条活动分享
【剑指 Offer】剑指 Offer 22. 链表中倒数第k个节点
【Pointing to Offer】Pointing to Offer 22. The kth node from the bottom in the linked list
2种手绘风格效果比较,你更喜欢哪一种呢?
第十七届“振兴杯”全国青年 职业技能大赛——计算机程序设计员(云计算平台与运维)参赛回顾与总结
SimpleOSS third-party library libcurl and engine libcurl error solution
VS Code connects to SQL Server
随机推荐
natural language processing nltk
Chapter 14 Type Information
Immersive experience iFLYTEK 2022 Consumer Expo "Official Designated Product"
CIMC Shilian Dafeitong is the global industrial artificial intelligence AI leader, the world's top AI core technology, high generalization, high robustness, sparse sample continuous learning, industri
防抖和节流有什么区别,分别用于什么场景?
"Ruffian Heng Embedded Bimonthly" Issue 59
- daily a LeetCode 】 【 191. A number of 1
荐号 | 对你有恩的人,不要请吃饭来报答
Hello, my new name is "Bronze Lock/Tongsuo"
经济新闻:错误# 15:初始化libiomp5md。dll,但发现libiomp5md。已经初始化dll。解决方法
自然语言处理nltk
AI基础:图解Transformer
【剑指 Offe】剑指 Offer 18. 删除链表的节点
第十七届“振兴杯”全国青年 职业技能大赛——计算机程序设计员(云计算平台与运维)参赛回顾与总结
【刷题篇】计算质数
LocalDate时间生成
redis
【每日一道LeetCode】——191. 位1的个数
After 23 years of operation, the former "China's largest e-commerce website" has turned yellow...
node封装一个控制台进度条插件