moving_mean = moving_mean * momentum + data_mean * (1 - momentum)
moving_var = moving_var * momentum + data_var * (1 - momentum)

如果use_global_stats设置为true,则使用moving_mean和moving_var代替data_mean和data_var来计算输出。在推理过程中经常使用。

参数axis指定输入形状的哪个轴表示“通道”(单独的标准化组)。默认值为1。指定-1将通道轴设置为输入形状中的最后一项。

当fix_gamma设置为True时,不提供稀疏支持。如果fix_gamma设置为False,稀疏张量将回退。

gamma和beta都是可学习的参数。但如果fix_gamma为真,则将gamma设置为1,并将其渐变设置为0。

Parameters
data (NDArray) – Input data to batch normalizationgamma (NDArray) – gamma arraybeta (NDArray) – beta arraymoving_mean (NDArray) – running mean of inputmoving_var (NDArray) – running variance of inputeps (double, optional, default=0.0010000000474974513) – Epsilon to prevent div 0. Must be no less than CUDNN_BN_MIN_EPSILON defined in cudnn.h when using cudnn (usually 1e-5)momentum (float, optional, default=0.899999976) – Momentum for moving averagefix_gamma (boolean, optional, default=1) – Fix gamma while traininguse_global_stats (boolean, optional, default=0) – Whether use global moving statistics instead of local batch-norm. This will force change batch-norm into a scale shift operator.output_mean_var (boolean, optional, default=0) – Output the mean and inverse stdaxis (int, optional, default='1') – Specify which shape axis the channel is specifiedcudnn_off (boolean, optional, default=0) – Do not select CUDNN operator, if availablemin_calib_range (float or None, optional, default=None) – The minimum scalar value in the form of float32 obtained through calibration. If present, it will be used to by quantized batch norm op to calculate primitive scale.Note: this calib_range is to calib bn output.max_calib_range (float or None, optional, default=None) – The maximum scalar value in the form of float32 obtained through calibration. If present, it will be used to by quantized batch norm op to calculate primitive scale.Note: this calib_range is to calib bn output.out (NDArray, optional) – The output NDArray to hold the result.Returns
out – The output of this function.Return type
NDArray or list of NDArrays

mxnet基础到提高(53)-批量标准化(2)相关推荐

  1. mxnet基础到提高(53)-ndarray与numpy之间转换

    from mxnet import nd import numpy as np x = nd.array(((1,2,3),(5,6,7))) y1=x.asnumpy() y2=nd.array(y ...

  2. mxnet基础到提高(6)--梯度,反馈与标准化(归一化)

    1.attach_grad(grad_req='write', stype=None) 附加一个梯度缓存在NDArray上,这样,回退(反馈)能计算相应的梯度 参数: grad_req ({'writ ...

  3. mxnet基础到提高(51)-Activation激活函数

    mxnet.ndarray.Activation(data=None, act_type=_Null, out=None, name=None, **kwargs) Applies an activa ...

  4. mxnet基础到提高(49)-使用免费的云jupyter

    强大而免费的GOOGLE 云jupyter notebook https://colab.research.google.com/notebooks/intro.ipynb#recent=true 什 ...

  5. mxnet基础到提高(48)-ones和ones_like

    返回全1元素矩阵 mxnet.ndarray.ones(shape, ctx=None, dtype=None, **kwargs)[source] Returns a new array fille ...

  6. mxnet基础到提高(46)-ndarray.zeros,CSRNDArray稀疏矩阵

    mxnet.ndarray.zeros(shape, ctx=None, dtype=None, stype=None, **kwargs)[source] 返回一个新的array数组,指定shape ...

  7. mxnet基础到提高(44)-ndarray.arange创建行向量

    mxnet.ndarray.arange(start, stop=None, step=1.0, repeat=1, infer_range=None, ctx=None, dtype=<cla ...

  8. mxnet基础到提高(43)-编译安装

    因为pip方式安装,不能安装c++接口,此外,此方式安装的包,是使用默认参数编译的,很多运行环境要求使用指定参数编译,比如,不支持GPU,不支持SSE,还有嵌入式环境或上网本等低档设备以及端设备运行. ...

  9. mxnet基础到提高(40)-ndarray之运算(1)

    # -*- coding: utf-8 -*- """ Spyder EditorThis is a temporary script file. "" ...

最新文章

  1. CMS:听我的,生产环境上要这样配置JVM参数
  2. JVM---虚拟机栈(局部变量表)
  3. 作为HTC在MWC2012移动世界大会上推出的全新系列产品。
  4. ApacheTomcat解析请求参数的过程
  5. Java工程师知识图谱
  6. Windows Phone性能优化建议
  7. 5186. 区间内查询数字的频率
  8. 从北京回来的年轻人,我该告诉你点什么?
  9. 【商业】10个经济学概念,让你看清复杂世界
  10. python计算选手最后得分并取出前三名_MySQL中查询获取每个班级成绩前三名的学生信息...
  11. android横向滑动缩放,移动端实现内容左右滑动,并点击放大效果的问题
  12. 法拉利杀手Koenigsegg CCX
  13. 课堂测试2014.3.10
  14. 十年Smartbi项目经理:BI应用在银行业的发展历程和展望
  15. php 获取搜索引擎,php获取搜索引擎关键字来源(支持百度、谷歌等搜索引擎)的函数...
  16. python自动玩游戏_python学习:(2)自动玩2048游戏
  17. Excel - 字符串处理函数:LEFT, RIGHT, MID, LEN 和 FIND
  18. 详解pandas编码函数pd.factorize()
  19. 1071svm函数 r语言,科学网—R中的svm - 吴锐的博文
  20. element-ui table表格。数组对应的一组数据占有两行怎么处理?

热门文章

  1. P2014 选课 (树形动规)
  2. codevs 1269 匈牙利游戏
  3. 【PHP】__autoload()魔术方法与spl_autoload_register
  4. eclipse版本详解以及下载安装步骤及启动eclispe报错整理
  5. sqlserver的四种分页方式
  6. [BZOJ2654] tree
  7. smarty访问数组中的数据,如果是关联数组直接用点.
  8. FLASH STUDY LOG
  9. Qt Creator下载和安装(详细教程)以及如何发布可执行程序
  10. 仿个人税务 app html5_手机里发现这类APP,赶紧删!