当前位置:网站首页>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)? - 知乎
我理解这个是数据本身提供/组织/个人已经计算出来了,然后大家就这样用了。
因为只要数据集确定,这个均值 & 标准差 就不会再变了。
边栏推荐
- Delay queue optimization (2)
- AWS console
- 【PHPWord】Quick Start of PHPWord in PHPOffice Suite
- Go 系统收集
- 又一家公司面试的内容
- OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.解决方法
- 攻防世界web-Cat
- VBA batch import Excel data into Access database
- 【hbuilder】运行不了部分项目 , 打开终端 无法输入指令
- 解决终极bug,项目最终能顺利部署上线。
猜你喜欢

NC | 西湖大学陶亮组-TMPRSS2“助攻”病毒感染并介导索氏梭菌出血毒素的宿主入侵...
![[Prometheus] An optimization record of the Prometheus federation [continued]](/img/5d/56e171b7a02584337a0cfe5c731fb2.png)
[Prometheus] An optimization record of the Prometheus federation [continued]

VS Code connects to SQL Server

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

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

natural language processing nltk

一文读懂“语言模型”

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

JS提升:Promise中reject与then之间的关系

Hello, my new name is "Bronze Lock/Tongsuo"
随机推荐
MySQL data types
VBA 连接Access数据库和Excle
scrapy基本使用
NC | Tao Liang Group of West Lake University - TMPRSS2 "assists" virus infection and mediates the host invasion of Clostridium sothrix hemorrhagic toxin...
第十七届“振兴杯”全国青年 职业技能大赛——计算机程序设计员(云计算平台与运维)参赛回顾与总结
微信小程序云开发 | 城市信息管理
跨进程启动后台服务
What is a RESTful API?
requet.getHeader(“token“) 为null
Go 系统收集
自己需要努力
深入浅出边缘云 | 3. 资源配置
云数据库和本地数据库有什么区别?
Codeblocks + Widgets create window code analysis
7.30模拟赛总结
Deepen school-enterprise cooperation and build an "overpass" for the growth of technical and skilled talents
二分答案裸题(加一点鸽巢原理)
[TypeScript]编译配置
Basic use of scrapy
Fixed asset visualization intelligent management system

