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

网站主机安全wordpress 清理媒体库

网站主机安全,wordpress 清理媒体库,建设网站需要注意什么手续,中山外包网站设计分类目录:《深入浅出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不会将其考虑在内。

该函数用 Dirac δ \text{Dirac}\delta Diracδ 函数来填充3-5维输入张量或变量,在卷积层尽可能多的保存输入通道特征。

语法

torch.nn.init.dirac_(tensor, groups=1)

参数

  • tensor:[Tensor] 一个3~5维张量torch.Tensor
  • groups:[int] conv层中的组数,默认值为1

返回值

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

实例

w = torch.empty(3, 16, 5, 5)
nn.init.dirac_(w)
w = torch.empty(3, 24, 5, 5)
nn.init.dirac_(w, 3)

函数实现

def dirac_(tensor, groups=1):r"""Fills the {3, 4, 5}-dimensional input `Tensor` with the Diracdelta function. Preserves the identity of the inputs in `Convolutional`layers, where as many input channels are preserved as possible. In caseof groups>1, each group of channels preserves identityArgs:tensor: a {3, 4, 5}-dimensional `torch.Tensor`groups (int, optional): number of groups in the conv layer (default: 1)Examples:>>> w = torch.empty(3, 16, 5, 5)>>> nn.init.dirac_(w)>>> w = torch.empty(3, 24, 5, 5)>>> nn.init.dirac_(w, 3)"""dimensions = tensor.ndimension()if dimensions not in [3, 4, 5]:raise ValueError("Only tensors with 3, 4, or 5 dimensions are supported")sizes = tensor.size()if sizes[0] % groups != 0:raise ValueError('dim 0 must be divisible by groups')out_chans_per_grp = sizes[0] // groupsmin_dim = min(out_chans_per_grp, sizes[1])with torch.no_grad():tensor.zero_()for g in range(groups):for d in range(min_dim):if dimensions == 3:  # Temporal convolutiontensor[g * out_chans_per_grp + d, d, tensor.size(2) // 2] = 1elif dimensions == 4:  # Spatial convolutiontensor[g * out_chans_per_grp + d, d, tensor.size(2) // 2,tensor.size(3) // 2] = 1else:  # Volumetric convolutiontensor[g * out_chans_per_grp + d, d, tensor.size(2) // 2,tensor.size(3) // 2, tensor.size(4) // 2] = 1return tensor
http://www.yayakq.cn/news/990148/

相关文章:

  • 杭州做网站好的公司科学规划网页的做法是
  • 网站推广关键词工具大连在哪个省的什么位置
  • 杭州设计网站最好的公司主题教育网站建立
  • 一个企业网站做几个关键词企业网站建设需求调查表
  • 外贸流程图片济南网站搜索优化
  • 企业网站自助建什么做电子书下载网站
  • 网站多少图片怎么做超链接价格低怎么说
  • 做网站要用什么语言莱芜中考网站
  • 鹤岗北京网站建设推广平台网站制作
  • 做网站的网络公司税收优惠专业的丹徒网站建设
  • 校园网站建设的目的wordpress与微信公众号互通
  • 宿主选择 网站建设黄图网站有哪些 推荐
  • 网站销户说明wordpress 评论编辑器
  • 广东微信网站建设哪家专业软件开发公司哪家好
  • 建网站的详细步骤网页美工设计师工作内容
  • 学做窗帘要下载哪个网站网络营销专家
  • 建站知识不属于网络营销的推广手段是什么
  • 怎么用视频做网站背景网上国网app缴费
  • wordpress发布时间优化产业结构
  • 内蒙古乌海建设局网站口碑最好装修公司
  • 企业网站的重要性自己开发app所需的各种费用
  • 东阳哪里可以做网站建立公司网站多少钱
  • 怎样建设门户网站左侧导航网站
  • 建设个人网站赚钱的经历html5手机端开发
  • 青海和城乡建设厅网站网站如何做映射
  • 深喘旋磨做紧夹断妖精网站大兴安岭网站推广
  • 网站主要内容不是网站开发语言的是
  • 网站排名优化怎么样wordpress怎么恢复
  • x网站免费模板域名备案是什么
  • 青岛网站建设找润商中山建设信息网站