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

珠海网站建设网络有限公司济南建设集团

珠海网站建设网络有限公司,济南建设集团,营销型网站与普通网站的区别,郑州%公司 网站建设二维可以想象成一张纸#xff0c; 三维可以想象成多张纸叠在一块 四维可以想成多沓纸 求和时#xff0c;如果没设定keepdimTrue,则会消去相加的那一维度#xff0c;否则则将维度变为1 A torch.arange(20).reshape(5, 4) A,A.shape, A.sum()(tensor([[ 0, 1, 2, 3],[ 4,…二维可以想象成一张纸 三维可以想象成多张纸叠在一块 四维可以想成多沓纸 求和时如果没设定keepdimTrue,则会消去相加的那一维度否则则将维度变为1 A torch.arange(20).reshape(5, 4) A,A.shape, A.sum()(tensor([[ 0, 1, 2, 3],[ 4, 5, 6, 7],[ 8, 9, 10, 11],[12, 13, 14, 15],[16, 17, 18, 19]]),torch.Size([5, 4]),tensor(190))指定求和汇总张量的轴 A_sum_axis0 A.sum(axis0) A_sum_axis0, A_sum_axis0.shape(tensor([40, 45, 50, 55]), torch.Size([4]))A_sum_axis1 A.sum(axis1) A_sum_axis1, A_sum_axis1.shape(tensor([ 6, 22, 38, 54, 70]), torch.Size([5]))# 等价于A.SUM() A.sum(axis[0, 1]), A.sum(axis[0, 1]).shape(tensor(190), torch.Size([]))# 三维 测试SA torch.arange(20 * 2).reshape(2, 5, 4) SA, SA.shape(tensor([[[ 0, 1, 2, 3],[ 4, 5, 6, 7],[ 8, 9, 10, 11],[12, 13, 14, 15],[16, 17, 18, 19]],[[20, 21, 22, 23],[24, 25, 26, 27],[28, 29, 30, 31],[32, 33, 34, 35],[36, 37, 38, 39]]]),torch.Size([2, 5, 4]))SA_sum_axis0 SA.sum(axis0) SA_sum_axis0, SA_sum_axis0.shape(tensor([[20, 22, 24, 26],[28, 30, 32, 34],[36, 38, 40, 42],[44, 46, 48, 50],[52, 54, 56, 58]]),torch.Size([5, 4]))SA_sum_axis1 SA.sum(axis1) SA_sum_axis1, SA_sum_axis1.shape(tensor([[ 40, 45, 50, 55],[140, 145, 150, 155]]),torch.Size([2, 4]))SA_sum_axis2 SA.sum(axis2) SA_sum_axis2, SA_sum_axis2.shape(tensor([[ 6, 22, 38, 54, 70],[ 86, 102, 118, 134, 150]]),torch.Size([2, 5]))四维矩阵求和 A torch.arange(20*2*2).reshape((2,2,5,4)) A, A.shape(tensor([[[[ 0, 1, 2, 3],[ 4, 5, 6, 7],[ 8, 9, 10, 11],[12, 13, 14, 15],[16, 17, 18, 19]],[[20, 21, 22, 23],[24, 25, 26, 27],[28, 29, 30, 31],[32, 33, 34, 35],[36, 37, 38, 39]]],​ [[[40, 41, 42, 43], [44, 45, 46, 47], [48, 49, 50, 51], [52, 53, 54, 55], [56, 57, 58, 59]], [[60, 61, 62, 63],[64, 65, 66, 67],[68, 69, 70, 71],[72, 73, 74, 75],[76, 77, 78, 79]]]]),torch.Size([2, 2, 5, 4]))A_sum_axis0 A.sum(axis0) A_sum_axis0, A_sum_axis0.shape(tensor([[[ 40, 42, 44, 46],[ 48, 50, 52, 54],[ 56, 58, 60, 62],[ 64, 66, 68, 70],[ 72, 74, 76, 78]],[[ 80, 82, 84, 86],[ 88, 90, 92, 94],[ 96, 98, 100, 102],[104, 106, 108, 110],[112, 114, 116, 118]]]),torch.Size([2, 5, 4]))A_sum_axis1 A.sum(axis1) A_sum_axis1, A_sum_axis1.shape(tensor([[[ 20, 22, 24, 26],[ 28, 30, 32, 34],[ 36, 38, 40, 42],[ 44, 46, 48, 50],[ 52, 54, 56, 58]],[[100, 102, 104, 106],[108, 110, 112, 114],[116, 118, 120, 122],[124, 126, 128, 130],[132, 134, 136, 138]]]),torch.Size([2, 5, 4]))
http://www.pierceye.com/news/929662/

相关文章:

  • 东莞网站建设教程wordpress 插件 破解
  • 响应式网站做法免费seo网站
  • 网站搭建合作协议cms drupal wordpress
  • 桂林创新大厦网站佛山网站建设培训
  • 如何网站关键词优化idc机房托管
  • 做网站 做好把我踢开WordPress Core 5.0
  • 飓风 网站建设ip形象设计报价明细
  • 太原网站seo外包信誉好的赣州网站建设
  • 英文网站如何做关键词网站关键词多少个好
  • 手机网站静态动态珠海网页搜索排名提升
  • 旅游公司网站建设方案宁德市住房和城乡建设局新网站
  • 网站开发购物店网站营销策略
  • 福建省建设局网站安顺市哪里可以做网站
  • 网站服务设计仿《爱美眉》网站 dede
  • 茌平网站建设哪个地方可学习网站建设
  • 便民的网站app怎么做acg的wordpress主题
  • 外贸网站高端定做网络营销培训
  • 电子通讯录网站建设08影院wordpress影视主题源码
  • 电商设计素材网站推荐然后建设自营网站
  • 网站方案设计网页兼容性 网站开发
  • 做网站怎么申请域名游戏软件开发需要学什么
  • 做外贸网站需要什么卡创app开发 杭州app开发公司
  • 哪个网站可以做视频外链怎样退订3d卫星街景会员费用
  • 烟台做网站建设电话设置网站默认编码
  • seo官网制作规划绍兴seo整站优化
  • 怎么做网站广告设计学习
  • 邵东平台网站建设中山手机台app
  • 学什么可以做网站免费qq空间网站
  • 网站套餐到期啥意思电子商务电商网站饿建设
  • 电商网站零售客户重庆旅游景点