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

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

相关文章:

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

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


计算input和other的元素最大值。

语法

复制代码
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]])
相关推荐
小马过河R3 小时前
真实场景:用户自建定时任务与推送提醒Agent-架构设计与可靠性实践
数据库·人工智能·agent·vibe coding·ai coding
山川而川-R3 小时前
RK3588边缘计算:YOLOv8 使用Android NDK部署_笔记1
人工智能·笔记·yolo·安卓
FengY_HYY3 小时前
Agent 时代,你的身份由你来定义
人工智能·agent·游戏开发
shengjk14 小时前
AI最大的讽刺:你以为它能结束996,资本却可能用它开启997
人工智能
fanstuck4 小时前
AI 回答得头头是道,怎么一查原文,条号就对不上了?
人工智能·aigc·agent
硅谷秋水4 小时前
BAAI的PhysCapBench分析
人工智能·机器学习·机器人
Dawson Zhu4 小时前
【多平台适配③】Ascend NPU昇腾适配:CANN软件栈与算子迁移实战
人工智能·语言模型·架构·aigc·agi
民乐团扒谱机5 小时前
【超详细】基频音高提取算法之SWIPE 算法深度解析:频谱匹配的精度极限与工程边界
人工智能·算法
SelectDB5 小时前
数据湖的数据怎么直接查?Apache Doris 免搬运查询 Iceberg、Paimon、Lance 与 AI 检索实战
人工智能