深入浅出Pytorch函数——torch.maximum

分类目录:《深入浅出Pytorch函数》总目录

相关文章:

· 深入浅出Pytorch函数------torch.max

· 深入浅出Pytorch函数------torch.maximum


计算inputother的元素最大值。

语法

复制代码
torch.maximum(input, other, *, out=None) -> Tensor

参数

  • input`Tensor` 输入张量
  • other`Tensor` 输入的第二个张量

实例

复制代码
>>> a = torch.randn(4, 5)
>>> b = torch.randn(4, 5)
>>> torch.max(a, b)
tensor([[ 0.9931,  0.3162,  1.7202,  0.2977,  2.4843],
        [ 2.1384,  0.6760,  0.6328, -1.2002,  0.2046],
        [-0.1132,  0.6711,  2.5104,  1.2836, -1.5387],
        [ 0.4333, -0.1055,  2.3136,  1.2815,  0.3704]])
相关推荐
企鹅的企24 分钟前
2027北京AI数字健康与智慧医疗展官方:超两成展品亚洲首秀
人工智能·科技·机器人
lvts_cs28 分钟前
淄博高新区绿天使数智创新港:高标准产研厂房全维度详解
大数据·人工智能
百胜软件@百胜软件1 小时前
从“人找货”到“货找人”:「胜券商品」如何用AI重构配补调
人工智能·重构
风流 少年1 小时前
Spring AI 2.0:Advisor
android·人工智能·spring
zhangfeng11331 小时前
[帮助聋哑人沟通]Tiger AI 手势识别大升级:从数字到无声世界,双手同时比划也能秒识别
人工智能
chunmiao30321 小时前
Claude 文本水印引退订,AI 内容溯源时代要来了
人工智能
维核科技2 小时前
AI+智慧农业:从选种到丰收的AI赋能之路
人工智能
killerbasd2 小时前
总结 8。15
人工智能·机器学习·概率论
数智化转型推荐官2 小时前
AI驱动采购全链路革新:泛微·京桥通智能化采购管理方案深度解读
人工智能