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

企业文化建设怎么做郑州seo代理外包公司

企业文化建设怎么做,郑州seo代理外包公司,青岛品牌网站建设,建行手机银行下载app最新版分类目录:《深入浅出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不会将其考虑在内。

根据Saxe, A等人在《Exact solutions to the nonlinear dynamics of learning in deep linear neural networks》中描述的方法,用(半)正交矩阵填充输入的张量或变量。输入张量必须至少是2维的,对于更高维度的张量,超出的维度会被展平,视作行等于第一个维度,列等于稀疏矩阵乘积的2维表示,其中非零元素生成自 N ( 0 , std 2 ) N(0, \text{std}^2) N(0,std2)

语法

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

参数

  • tensor:[Tensor] 一个 N N N维张量torch.Tensor,其中 N ≥ 2 N\geq 2 N2
  • gain:[可选] 比例因子

返回值

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

实例

w = torch.empty(3, 5)
nn.init.orthogonal_(w)

函数实现

def orthogonal_(tensor, gain=1):r"""Fills the input `Tensor` with a (semi) orthogonal matrix, asdescribed in `Exact solutions to the nonlinear dynamics of learning in deeplinear neural networks` - Saxe, A. et al. (2013). The input tensor must haveat least 2 dimensions, and for tensors with more than 2 dimensions thetrailing dimensions are flattened.Args:tensor: an n-dimensional `torch.Tensor`, where :math:`n \geq 2`gain: optional scaling factorExamples:>>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_LAPACK)>>> w = torch.empty(3, 5)>>> nn.init.orthogonal_(w)"""if tensor.ndimension() < 2:raise ValueError("Only tensors with 2 or more dimensions are supported")if tensor.numel() == 0:# no-opreturn tensorrows = tensor.size(0)cols = tensor.numel() // rowsflattened = tensor.new(rows, cols).normal_(0, 1)if rows < cols:flattened.t_()# Compute the qr factorizationq, r = torch.linalg.qr(flattened)# Make Q uniform according to https://arxiv.org/pdf/math-ph/0609050.pdfd = torch.diag(r, 0)ph = d.sign()q *= phif rows < cols:q.t_()with torch.no_grad():tensor.view_as(q).copy_(q)tensor.mul_(gain)return tensor
http://www.dinnco.com/news/28612.html

相关文章:

  • 2345网址导航下载桌面windows优化大师官方免费
  • 中国比较有名的公司双滦区seo整站排名
  • 点餐网站怎么做海淀seo搜索优化多少钱
  • 网站建设与管理报告书海淀区seo搜索优化
  • 网站设计样式成品网站货源1688在线
  • 兰州网站建设q.479185700強重庆好的seo平台
  • 网站设计兼职重庆森林
  • 做旅游攻略去什么网站好seo搜索引擎优化案例
  • wordpress源码整合嘉兴seo网络推广
  • 天津网站建设方案咨询谷歌seo引擎优化
  • 给工厂做英文外贸网站天津百度推广排名优化
  • 网站建设 微信 app站内搜索引擎
  • 做的网站在不同浏览器搜索引擎优化的具体措施
  • 专业模板建站价格天津债务优化公司
  • 凡客家具是品牌吗西安做推广优化的公司
  • 揭阳企业自助建站系统seo和sem的关系
  • 图片站手机网站怎么做的百度问一问客服人工在线咨询
  • 找兼职做网站建设时事新闻热点
  • 05网伴你学淘宝seo优化
  • 高端公司网站建设网站seo优化分析
  • 建设一个网站的操作流程300字近三天新闻50字左右
  • 2023网络营销成功案例重庆整站seo
  • 2023年免费b站入口信息流优化师是什么
  • 附近广告公司喷绘刻字株洲企业seo优化
  • 路由器做网站服务器互联网营销方案
  • 长沙市网站制作公司网络营销策划书范文
  • 天津网站排名优化费用免费产品推广网站
  • 织梦可以做微网站吗西安百度
  • 电子商务网站建设项目规划书公司培训
  • 网站修改图片怎么做北京网站制作建设公司