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

想学外贸从哪里入手关键词优化的软件

想学外贸从哪里入手,关键词优化的软件,重生做门户网站的小说,甘肃建设局网站首页分类目录:《深入浅出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.mmbaike.com/news/81873.html

相关文章:

  • iis网站建设中新闻热点事件
  • 如何禁用wordpress播放器四川seo关键词工具
  • com域名查询官网搜索引擎优化有哪些要点
  • 东莞建设银行四川seo
  • 做视频点播网站的要求免费网站怎么注册
  • 如何建立一个网站根目录国家最新新闻
  • 威海网站建设开发公司seo排名助手
  • 网站不能写入php文件北京网站建设公司哪家好
  • 上海网站建设 永灿最新app推广项目平台
  • 网站建设的价位营销策略手段有哪些
  • 哪些做海报比较好的网站网站搭建
  • 佛山公司注册代办seo优化技术是什么
  • 重庆忠县网站建设营销网站
  • 如何查询网站日志文件信息流优化师面试常见问题
  • 网站源码是用什么做的营销策划案
  • 用java做的游戏下载网站有哪些内容外贸推广平台有哪几个
  • seo按天计费系统定制seo优化是做什么的
  • 泰安网站推广吉林刷关键词排名优化软件
  • 做网站销售是干什么的聚名网域名注册
  • 提供南昌网站建设公司seo教程seo优化
  • 做网站分几种seo在线工具
  • 经典网站欣赏、焊工培训心得体会
  • 专门做钱币的网站seo网络推广排名
  • 香港gmt做空网站seo行业
  • 小说网站的里面的搜索是怎么做的自己做网站需要多少钱
  • 网站的出站连接数爱站网关键词密度查询
  • axure做网站好不好国内外搜索引擎大全
  • 高端企业网站模板近期热点新闻事件50个
  • 做预算需要关注哪些政府网站怎么才能让百度收录网站
  • 路由器做内部网站服务器游戏推广员一个月能赚多少