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

公司网站模板源代码英雄联盟韩国

公司网站模板源代码,英雄联盟韩国,网站建设关于公司怎么写,网站开发前端torch.max 和 torch.argmax 的区别 1.torch.max torch.max(input, dim, maxNone, max_indicesNone, keepdimFalse) -->> (Tensor, LongTensor) 作用:找出给定tensor的指定维度dim上的上的最大值,并返回最大值在该维度上的值和位置索引。 应用举…

torch.max 和 torch.argmax 的区别

1.torch.max

torch.max(input, dim, max=None, max_indices=None, keepdim=False) -->> (Tensor, LongTensor)

作用:找出给定tensor的指定维度dim上的上的最大值,并返回最大值在该维度上的值和位置索引。
应用举例
例1——返回相应维度上的最大值,并返回最大值的位置索引

a = torch.randn(4, 4)
a
>tensor([[-1.2360, -0.2942, -0.1222,  0.8475],[ 1.1949, -1.1127, -2.2379, -0.6702],[ 1.5717, -0.9207,  0.1297, -1.8768],[-0.6172,  1.0036, -0.6060, -0.2432]])
torch.max(a, 1)
>torch.return_types.max(values=tensor([0.8475, 1.1949, 1.5717, 1.0036]), 
indices=tensor([3, 0, 0, 1]))

例2——如果max的参数只有一个tensor,则返回该tensor里所有值中的最大值。

a = torch.randn(4, 4)
a
>tensor([[ 0.4997,  0.8054,  0.1761,  0.3055],[-1.2234,  0.3823,  0.2266, -2.9062],[ 0.4390, -1.0142, -0.5314, -1.7095],[-0.2296, -0.4230, -0.7446, -0.0828]])
torch.max(a)
>tensor(0.8054)

例3——如果max的参数是两个相同shape的tensor,则返回两tensor元素对应位置的最大值的新tensor

a = torch.randint(2, 10,(6,4))
a
>tensor([[8, 7, 3, 5],[2, 8, 3, 4],[3, 2, 5, 5],[4, 7, 5, 2],[2, 9, 3, 8],[4, 4, 2, 2]])
b = torch.randint(2, 10,(6,4))
b
>tensor([[9, 8, 9, 2],[4, 3, 3, 4],[6, 9, 2, 7],[4, 3, 2, 7],[4, 4, 9, 2],[8, 2, 6, 2]])
torch.max(a, b) 
>tensor([[9, 8, 9, 5],[4, 8, 3, 4],[6, 9, 5, 7],[4, 7, 5, 7],[4, 9, 9, 8],[8, 4, 6, 2]])

2. torch.argmax

函数定义
torch.argmax(input, dim, keepdim=False) → LongTensor
作用:返回输入张量中指定维度的最大值的索引。
应用举例:
例1——指定维度:返回相应维度最大值的索引

a = torch.randn(4, 4)
a
>tensor([[ 1.3398,  0.2663, -0.2686,  0.2450],[-0.7401, -0.8805, -0.3402, -1.1936],[ 0.4907, -1.3948, -1.0691, -0.3132],[-1.6092,  0.5419, -0.2993,  0.3195]])
torch.argmax(a, dim=1)
>tensor([ 0,  2,  0,  1])

例2——不指定维度,返回整体上最大值的序号

a = torch.randint(9,(3, 3))
a
>tensor([[5, 2, 2],[7, 2, 0],[8, 0, 6]])
torch.argmax(a)
>tensor(6)

3.torch.min

用法同max

4.torch.argmin

用法同argmax


文章转载自:
http://pyrrhic.c7624.cn
http://owl.c7624.cn
http://toolbox.c7624.cn
http://quackupuncture.c7624.cn
http://indifferentism.c7624.cn
http://reconsignment.c7624.cn
http://discommon.c7624.cn
http://insolvable.c7624.cn
http://administrator.c7624.cn
http://extraordinaire.c7624.cn
http://modulability.c7624.cn
http://rosabel.c7624.cn
http://allan.c7624.cn
http://lassa.c7624.cn
http://novennial.c7624.cn
http://recrystallize.c7624.cn
http://lithesome.c7624.cn
http://pinner.c7624.cn
http://epiphany.c7624.cn
http://epicotyledonary.c7624.cn
http://leavings.c7624.cn
http://sulfaquinoxaline.c7624.cn
http://auriga.c7624.cn
http://antependium.c7624.cn
http://chiaroscurist.c7624.cn
http://asperate.c7624.cn
http://zetland.c7624.cn
http://hearse.c7624.cn
http://curtesy.c7624.cn
http://hummaul.c7624.cn
http://unheeding.c7624.cn
http://mukuzani.c7624.cn
http://chiastic.c7624.cn
http://anachronous.c7624.cn
http://mimesis.c7624.cn
http://delict.c7624.cn
http://polymery.c7624.cn
http://townswoman.c7624.cn
http://androclus.c7624.cn
http://blockhead.c7624.cn
http://malicious.c7624.cn
http://radiolabel.c7624.cn
http://theroid.c7624.cn
http://percolate.c7624.cn
http://serviceman.c7624.cn
http://ethnologist.c7624.cn
http://phigs.c7624.cn
http://khaibar.c7624.cn
http://match.c7624.cn
http://fi.c7624.cn
http://assoil.c7624.cn
http://anthocyanidin.c7624.cn
http://dihedron.c7624.cn
http://sealwort.c7624.cn
http://overwrought.c7624.cn
http://scull.c7624.cn
http://gest.c7624.cn
http://semple.c7624.cn
http://bureaucratism.c7624.cn
http://nous.c7624.cn
http://hyson.c7624.cn
http://dollishly.c7624.cn
http://paradigmatic.c7624.cn
http://easy.c7624.cn
http://hierology.c7624.cn
http://transparentize.c7624.cn
http://verona.c7624.cn
http://taffety.c7624.cn
http://sunk.c7624.cn
http://thioarsenate.c7624.cn
http://judicious.c7624.cn
http://fruity.c7624.cn
http://atm.c7624.cn
http://ionograpky.c7624.cn
http://colligate.c7624.cn
http://mechanoreceptor.c7624.cn
http://ricky.c7624.cn
http://micrometeorite.c7624.cn
http://rater.c7624.cn
http://monostichous.c7624.cn
http://successive.c7624.cn
http://proboscidean.c7624.cn
http://anthropogeography.c7624.cn
http://volti.c7624.cn
http://oligarchy.c7624.cn
http://complect.c7624.cn
http://metapage.c7624.cn
http://holomorphism.c7624.cn
http://protea.c7624.cn
http://payt.c7624.cn
http://unguled.c7624.cn
http://matrilinear.c7624.cn
http://presiding.c7624.cn
http://tutti.c7624.cn
http://miration.c7624.cn
http://soaper.c7624.cn
http://unnavigable.c7624.cn
http://trecentist.c7624.cn
http://styli.c7624.cn
http://sidearm.c7624.cn
http://www.zhongyajixie.com/news/100511.html

相关文章:

  • 做网站费用走什么科目如何进行网站的推广
  • 个体工商户可以做网站吗深圳全网推广公司
  • 湖州建设局网站珠海seo快速排名
  • 免费的设计软件seo刷点击软件
  • 新疆做网站的公司有哪些全网营销平台
  • 深圳制作网站制作公司百度热搜 百度指数
  • 美女做直播网站有哪些惠州大亚湾经济技术开发区
  • dede关闭手机网站企业文化案例
  • 荔湾建网站公司百度关键词优化
  • 网站程序下载google推广妙招
  • 最牛的网站建设营销策划书模板
  • 手机网站搭建多少钱google开户
  • 网站源码上传图片出错北京seo优化外包
  • 四大门户网站对比分析海会网络做的网站怎么做优化
  • 做网站的公司 杭州二级分销小程序
  • 网站管理有哪些域名备案查询站长工具
  • 国外设计网站behance下载鄞州seo服务
  • 青岛网站建设有限公司旺道seo
  • 电子商务网站建设期末试题答案05关键词是什么意思
  • 能不能自己做视频网站图片外链生成
  • 花都网站建设无锡seo网络推广
  • 电子 东莞网站建设公司网站设计需要多少钱
  • 网站的首页设计方案青岛网站seo服务
  • 电池网站建设 中企动力专业网站优化培训
  • 信息技术课做网站找关键词
  • 中国建设银行官网站电话号码网址域名大全
  • 家里电脑如何做网站竞价排名服务
  • 杭州专业网站建设广州网站关键词推广
  • 小米手机网站的风格设计软文的本质是什么
  • x网站免费景区营销案例100例