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

平面设计公司网站找生产厂家的网站

平面设计公司网站,找生产厂家的网站,玩互联网如何赚钱,263企业邮箱网页登录入口分类目录:《深入浅出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/935573/

相关文章:

  • 无锡网站制作无锡做网站免费行情软件网站游戏
  • 四川住房城乡建设周刊网站做游戏交易网站
  • 网站建设策划书模板国外免费psd网站
  • 做设计网站模块的网站信息服务平台官网
  • 汕头网站建设技术支持桂林网络搭建
  • 北京哪家做网站和网络推广好的免费的客户管理软件排行榜
  • 做电影类网站徐州铜山区
  • 用dw做网站的流程域名访问wordpress
  • 网站建设顶呱呱贺卡制作
  • 珠海网站建设制作设计佛山模板建站代理
  • 惠州城乡和住房建设局网站微网站ui多少钱
  • 成都网站seo海外推广方法有哪些
  • 创建自己的博客网站织梦dedecms蓝色培训机构模板教育学校学院整站php网站源码
  • 牙科网站开发网站界面设计的相关指南
  • 阜宁哪家专业做网站大宗商品交易平台有哪些
  • 如何解决旅游网站建设问题免费个人主页注册
  • 网站开发使用技术第二版答案1688网站登录
  • 湖南网站建设网站制作台州企业建站程序
  • 郴州网站建设哪家好网站模版购买
  • 海南免费做网站郑州汉狮做网站网络公司
  • 怎么创建网站要钱吗新余网站开发
  • 新蔡县做网站收多少钱如何建立公司网站建议和规则
  • 网站排名查询系统郑州网站及优化
  • 360免费建站教程大网站制作公司
  • 南宁网站建设博信网站搭建费用价格表
  • 制作网站的过程成都定制网站建设地址
  • 南通网站建设培训节点网站
  • 知名网站建设是哪家开发一个app收费
  • 微信建站官网免费注册创业找项目
  • 网站资源规划怎么写地方购物网站盈利模式