当前位置: 首页 > news >正文

做k12网站网站托管公司哪家好

做k12网站,网站托管公司哪家好,东莞做网页建站公司,wordpress gif动画分类目录:《深入浅出Pytorch函数》总目录 相关文章: 深入浅出Pytorch函数——torch.nn.init.calculate_gain 深入浅出Pytorch函数——torch.nn.init.uniform_ 深入浅出Pytorch函数——torch.nn.init.normal_ 深入浅出Pytorch函数——torch.nn.init.c…

分类目录:《深入浅出Pytorch函数》总目录
相关文章:
· 深入浅出Pytorch函数——torch.nn.init.calculate_gain
· 深入浅出Pytorch函数——torch.nn.init.uniform_
· 深入浅出Pytorch函数——torch.nn.init.normal_
· 深入浅出Pytorch函数——torch.nn.init.constant_
· 深入浅出Pytorch函数——torch.nn.init.ones_
· 深入浅出Pytorch函数——torch.nn.init.zeros_
· 深入浅出Pytorch函数——torch.nn.init.eye_
· 深入浅出Pytorch函数——torch.nn.init.dirac_
· 深入浅出Pytorch函数——torch.nn.init.xavier_uniform_
· 深入浅出Pytorch函数——torch.nn.init.xavier_normal_
· 深入浅出Pytorch函数——torch.nn.init.kaiming_uniform_
· 深入浅出Pytorch函数——torch.nn.init.kaiming_normal_
· 深入浅出Pytorch函数——torch.nn.init.trunc_normal_
· 深入浅出Pytorch函数——torch.nn.init.orthogonal_
· 深入浅出Pytorch函数——torch.nn.init.sparse_


torch.nn.init模块中的所有函数都用于初始化神经网络参数,因此它们都在torc.no_grad()模式下运行,autograd不会将其考虑在内。

根据Glorot, X.和Bengio, Y.在《Understanding the difficulty of training deep feedforward neural networks》中描述的方法,用一个均匀分布生成值,填充输入的张量或变量。结果张量中的值采样自 U ( − a , a ) U(-a, a) U(a,a),其中:
a = gain × 6 fan_in + fan_put a=\text{gain}\times\sqrt{\frac{6}{\text{fan\_in}+\text{fan\_put}}} a=gain×fan_in+fan_put6

这种方法也被称为Glorot initialization。

语法

torch.nn.init.xavier_uniform_(tensor, gain=1)

参数

  • tensor:[Tensor] 一个 N N N维张量torch.Tensor
  • gain :[float] 可选的缩放因子

返回值

一个torch.Tensor且参数tensor也会更新

实例

w = torch.empty(3, 5)
nn.init.xavier_uniform_(w, gain=nn.init.calculate_gain('relu'))

函数实现

def xavier_uniform_(tensor: Tensor, gain: float = 1.) -> Tensor:r"""Fills the input `Tensor` with values according to the methoddescribed in `Understanding the difficulty of training deep feedforwardneural networks` - Glorot, X. & Bengio, Y. (2010), using a uniformdistribution. The resulting tensor will have values sampled from:math:`\mathcal{U}(-a, a)` where.. math::a = \text{gain} \times \sqrt{\frac{6}{\text{fan\_in} + \text{fan\_out}}}Also known as Glorot initialization.Args:tensor: an n-dimensional `torch.Tensor`gain: an optional scaling factorExamples:>>> w = torch.empty(3, 5)>>> nn.init.xavier_uniform_(w, gain=nn.init.calculate_gain('relu'))"""fan_in, fan_out = _calculate_fan_in_and_fan_out(tensor)std = gain * math.sqrt(2.0 / float(fan_in + fan_out))a = math.sqrt(3.0) * std  # Calculate uniform bounds from standard deviationreturn _no_grad_uniform_(tensor, -a, a)
http://www.yayakq.cn/news/555715/

相关文章:

  • 建设局哪个网站查证给别人做的网站要复杂做安全扫描
  • 上海怎么建设网站创业平台网
  • 天津做艺术品的网站大连金州网站建设
  • 建设部勘察设计网站WordPress HTML标签验证
  • 二手车做网站的目的重庆网站建设哪里有
  • 株洲制作网站什么值得买 wordpress
  • 学校门户网站模板ppt简约大气模板
  • 官方网站旗舰店网站因该怎么做参考文献
  • 怎么网上推广自己的产品seo研究中心教程
  • 如何介绍网站建设公司wordpress微信qq登陆
  • 如何分析网站用户体验app平台需要多少钱
  • 做网站教程pdf奔驰宝马游戏网站建设
  • 杭州做搜索引擎网站的公司网站建设 网络推广
  • 中国现代公路建设有限公司网站个人网站定制
  • 网站的需求奈曼旗华水建设工程公司网站
  • 网站的形式有哪些成都建设工程交易中心网站
  • 九讯鹿网站建设直播软件哪个最好用
  • 安卓从网站获取视频怎么做新闻发稿
  • 电影院订票网站开发怎么建公司网站教程
  • 在家做农业关注什么网站手机搜索引擎
  • 网站的服务有哪些网站建设与制作设计公司
  • 精利手表网站湛江企业网站建设公司
  • 做的新网站能用多久泰国公共建设网站
  • 企业网站seo运营有赞分销
  • 线上推广计划免费网站seo
  • 公司做网站怎么赚钱吗刷seo快速排名
  • 广州网站建设360元查看网站开发
  • 十堰微网站建设电话wordpress标题去掉私密
  • 网站建设及应用实施方案9158个人空间登录
  • 创业 建网站免费域名的选择方法