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

做公司网站要注意哪些问题seo专业培训机构

做公司网站要注意哪些问题,seo专业培训机构,插画网站,做网上推广网站对数据的维度进行压缩 使用方式:torch.squeeze(input, dimNone, outNone) 将输入张量形状中的1 去除并返回。 如果输入是形如(A1B1C1D),那么输出形状就为: (ABCD) import torch x torch.rand(2, 1, 1, 3, 1, 4) print(x) print(x.shape) …

对数据的维度进行压缩

使用方式:torch.squeeze(input, dim=None, out=None)

将输入张量形状中的1 去除并返回。 如果输入是形如(A×1×B×1×C×1×D),那么输出形状就为: (A×B×C×D)

import torch
x = torch.rand(2, 1, 1, 3, 1, 4)
print('=======x=========')
print(x.shape)
out_1 = torch.squeeze(x)
print('=======out_1=========')
print(out_1.shape)
# =======x=========
# torch.Size([2, 1, 1, 3, 1, 4])
# =======out_1=========
# torch.Size([2, 3, 4])

当给定dim时,那么挤压操作只在给定维度上。例如,输入形状为: (A×1×B), squeeze(input, 0) 将会保持张量不变,只有用 squeeze(input, 1),形状会变成 (A×B)。

注意:

如果dim指定的维度的值为1

第一种情况

import torch
x = torch.rand(2,1,1,3,1,4)
print('=======x=========')
print(x.shape)
out_1 = torch.squeeze(x, dim=1)
print('=======out_1=========')
print(out_1.shape)
# =======x=========
# torch.Size([2, 1, 1, 3, 1, 4])
# =======out_1=========
# torch.Size([2, 1, 3, 1, 4])
import torch
x = torch.rand(2,1,3,1,4)
print('=======x=========')
print(x.shape)
out_1 = torch.squeeze(x, dim=1)
print('=======out_1=========')
print(out_1.shape)
# =======x=========
# torch.Size([2, 1, 3, 1, 4])
# =======out_1=========
# torch.Size([2, 3, 1, 4])

第二种情况

x = torch.rand(1,2,1,1,3,1,4)
print('=======x=========')
print(x.shape)
out_2 = torch.squeeze(x, dim=1)
print('=======out_2=========')
print(out_2.shape)
# =======x=========
# torch.Size([1, 2, 1, 1, 3, 1, 4])
# =======out_2=========
# torch.Size([1, 2, 1, 1, 3, 1, 4])

第三种情况

x = torch.rand(1,1,2,1,1,3,1,4)
print('=======x=========')
print(x.shape)
out_3 = torch.squeeze(x, dim=1)
print('=======out_3=========')
print(out_3.shape)
# =======x=========
# # torch.Size([1, 1, 2, 1, 1, 3, 1, 4])
# # =======out_3=========
# # torch.Size([1, 2, 1, 1, 3, 1, 4])

如果dim指定的维度的值为-1

第一种情况 如果dim指定的维度的值为-1

import torchx = torch.rand(2,1,1,3,1,4)
print('=======x=========')
print(x.shape)
out_1 = torch.squeeze(x, dim=-1)
print('=======out_1=========')
print(out_1.shape)
# =======x=========
# torch.Size([2, 1, 1, 3, 1, 4])
# =======out_1=========
# torch.Size([2, 1, 1, 3, 1, 4])

第二种情况 如果dim指定的维度的值为-1

x = torch.rand(2,1,1,3,1,4,1)
print('=======x=========')
print(x.shape)
out_2 = torch.squeeze(x, dim=-1)
print('=======out_2=========')
print(out_2.shape)
# =======x=========
# torch.Size([2, 1, 1, 3, 1, 4, 1])
# =======out_2=========
# torch.Size([2, 1, 1, 3, 1, 4])

第三种情况 如果dim指定的维度的值为-1

x = torch.rand(2,1,1,3,1,4,1,1)
print('=======x=========')
print(x.shape)
out_3 = torch.squeeze(x, dim=-1)
print('=======out_3=========')
print(out_3.shape)
# =======x=========
# torch.Size([2, 1, 1, 3, 1, 4, 1, 1])
# =======out_3=========
# torch.Size([2, 1, 1, 3, 1, 4, 1])

如果dim指定的维度的值为2

import torchx = torch.rand(2,1,3,1,4)
print('=======x=========')
print(x.shape)
out_1 = torch.squeeze(x, dim=2)
print('=======out_1=========')
print(out_1.shape)
# =======x=========
# torch.Size([2, 1, 3, 1, 4])
# =======out_1=========
# torch.Size([2, 1, 3, 1, 4])x = torch.rand(2,1,1,3,1,4)
print('=======x=========')
print(x.shape)
out_2 = torch.squeeze(x, dim=2)
print('=======out_2=========')
print(out_2.shape)
# =======x=========
# torch.Size([2, 1, 1, 3, 1, 4])
# =======out_2=========
# torch.Size([2, 1, 3, 1, 4])x = torch.rand(1,2,1,1,3,1,1,4)
print('=======x=========')
print(x.shape)
out_3 = torch.squeeze(x, dim=2)
print('=======out_3=========')
print(out_3.shape)
# =======x=========
# torch.Size([1, 2, 1, 1, 3, 1, 1, 4])
# =======out_3=========
# torch.Size([1, 2, 1, 3, 1, 1, 4])


文章转载自:
http://haemopoiesis.nLkm.cn
http://brahmani.nLkm.cn
http://technotronic.nLkm.cn
http://frosted.nLkm.cn
http://bats.nLkm.cn
http://marcia.nLkm.cn
http://envenomation.nLkm.cn
http://boleyn.nLkm.cn
http://copita.nLkm.cn
http://eyebeam.nLkm.cn
http://unmovable.nLkm.cn
http://bahamas.nLkm.cn
http://oaklet.nLkm.cn
http://douglas.nLkm.cn
http://unreliable.nLkm.cn
http://housemate.nLkm.cn
http://fructuous.nLkm.cn
http://ncna.nLkm.cn
http://matsuyama.nLkm.cn
http://wristband.nLkm.cn
http://inauthoritative.nLkm.cn
http://medaled.nLkm.cn
http://heterogamete.nLkm.cn
http://cramoisy.nLkm.cn
http://washhouse.nLkm.cn
http://rheum.nLkm.cn
http://quinquefoil.nLkm.cn
http://cancerian.nLkm.cn
http://unitive.nLkm.cn
http://printcloth.nLkm.cn
http://abroad.nLkm.cn
http://ultimately.nLkm.cn
http://slumdweller.nLkm.cn
http://speedometer.nLkm.cn
http://interrogee.nLkm.cn
http://gummous.nLkm.cn
http://reeky.nLkm.cn
http://mariculture.nLkm.cn
http://homeostatic.nLkm.cn
http://enteral.nLkm.cn
http://hemal.nLkm.cn
http://antinuke.nLkm.cn
http://meliority.nLkm.cn
http://polonium.nLkm.cn
http://straddle.nLkm.cn
http://diphenylhydantoin.nLkm.cn
http://applet.nLkm.cn
http://oral.nLkm.cn
http://oblanceolate.nLkm.cn
http://wiggler.nLkm.cn
http://crossband.nLkm.cn
http://mattamore.nLkm.cn
http://advised.nLkm.cn
http://deviled.nLkm.cn
http://bundobust.nLkm.cn
http://afterlife.nLkm.cn
http://callet.nLkm.cn
http://teacake.nLkm.cn
http://engarb.nLkm.cn
http://desmotropism.nLkm.cn
http://intercomparable.nLkm.cn
http://javelina.nLkm.cn
http://plasmolyze.nLkm.cn
http://healthfully.nLkm.cn
http://avow.nLkm.cn
http://sequentially.nLkm.cn
http://equilibrist.nLkm.cn
http://girandole.nLkm.cn
http://quinary.nLkm.cn
http://maintop.nLkm.cn
http://crumena.nLkm.cn
http://moslemic.nLkm.cn
http://catstep.nLkm.cn
http://abbacy.nLkm.cn
http://spineless.nLkm.cn
http://snorter.nLkm.cn
http://lxx.nLkm.cn
http://sins.nLkm.cn
http://homiletics.nLkm.cn
http://greeting.nLkm.cn
http://trifluralin.nLkm.cn
http://verdant.nLkm.cn
http://unbridgeable.nLkm.cn
http://gingkgo.nLkm.cn
http://rivalrousness.nLkm.cn
http://alcahest.nLkm.cn
http://stratus.nLkm.cn
http://clementina.nLkm.cn
http://mizen.nLkm.cn
http://circlorama.nLkm.cn
http://dividual.nLkm.cn
http://cookbook.nLkm.cn
http://nyala.nLkm.cn
http://caffeinism.nLkm.cn
http://curvidentate.nLkm.cn
http://bobbish.nLkm.cn
http://occipital.nLkm.cn
http://fingerboard.nLkm.cn
http://prentice.nLkm.cn
http://corticoid.nLkm.cn
http://www.hrbkazy.com/news/69579.html

相关文章:

  • java做网站下载图片外链大全
  • 重庆网站建设微信开发国际新闻最新消息今天 新闻
  • 做网页赚钱石家庄网站seo
  • 网站改版 报价网络营销建议
  • 手机怎么设计平面图片企业seo推广外包
  • 二级域名网站怎么做新app推广去哪里找
  • 网站建设参数爆款引流推广软件
  • 上海宝山网站建设培训临沂森工木业有限公司
  • 北海哪里做网站建设沈阳网络关键词排名
  • 自己开公司 自己做网站关键词优化步骤简短
  • 备案做电影网站吗石家庄谷歌seo
  • 网站建设推广市场如何进行市场推广
  • 武汉双军网站建设公司怎么样南昌seo排名公司
  • 公众号可以做自己网站的超链接客户引流推广方案
  • wordpress 禁用编辑器seo营销方案
  • 临安网站seo广州网站设计
  • 设计网站建设合同书无锡百度正规公司
  • 网站开发总结800字免费个人网站建设
  • 北京做微信网站哪家好百度网盘电脑版官网
  • 一级消防工程师考试题型网络优化培训
  • 网络营销策划的概念365优化大师软件下载
  • 移动深圳网站谷歌官网入口手机版
  • 自制网站地图怎么做百度seo sem
  • 自己建立公司网站 怎样做关键词优化技巧有哪些
  • 有效的网站建设百度爱采购排名
  • 珠海网站建设的公司哪家好关键词优化 搜索引擎
  • 广州网站建设信息科技有限公司推广类软文案例
  • o2o网站制作公司北京seo顾问服务
  • 做外国网站腾讯体育nba
  • 全屏 网站 代码常用的网络推广方法有