深入浅出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]])
相关推荐
TechubNews15 小时前
稳定币下一战:不是谁发币,而是谁掌握结算通道
人工智能·web3·区块链
多年小白16 小时前
紫光国微(002049) 分析
大数据·科技·深度学习·ai
火山引擎开发者社区16 小时前
钛投标基于火山引擎 ArkClaw 构建招投标垂直智能服务生态
人工智能
deephub16 小时前
Agent = Model + Harness:模型决定上限Harness 决定下限
人工智能·大语言模型·agent·harness
GalenZhang88816 小时前
Hermes Agent v0.14.0:AI Agent 基建时代正式到来
人工智能·hermes
动物园猫16 小时前
金属外表多种生锈检测数据集分享(适用于YOLO系列深度学习分类检测任务)
深度学习·yolo·分类
俊哥V16 小时前
每日 AI 研究简报 · 2026-05-17
人工智能·ai
johnrui16 小时前
RAG系统“入口”和“出口”的进化
人工智能
cyyt16 小时前
深度学习周报(5.11~5.17)
人工智能·深度学习