深入浅出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]])
相关推荐
宇擎智脑科技5 分钟前
一个 agent 怎么做“中途打断“:steer / followUp / nextTurn
人工智能·agent
zhangfeng11336 分钟前
Mamba transformer的颠覆者 论文技术解读与应用实践深度报告,
人工智能·深度学习·transformer
weixin_4462608512 分钟前
Skill-RM:通过Agent技能统一异构评估标准
人工智能
Sss_Ass26 分钟前
2026 年 AI 大模型 & AI 编程工具实战全总结
人工智能
IT231032 分钟前
RISC-V SoC设计解决方案:从架构优化到验证收敛
人工智能
BlockWay34 分钟前
WEEX Labs 周度观察:微软-OpenAI 合作调整与AI 多云趋势
大数据·人工智能·算法·安全·microsoft
掘金一周42 分钟前
问卷调查:如果现在收到裁员通知,你手里的现金流能支撑多久? | 沸点周刊6.4
前端·人工智能·后端
Smoothcloud润云1 小时前
5大功能精修,重构AI算力使用体验!
java·人工智能·windows·算法·重构·编辑器·sublime text
andafaAPS1 小时前
安达发|工艺品aps自动排产排程排单软件:告别生产“一团乱麻“
大数据·数据库·人工智能·安达发aps·计划排产软件·自动排单软件
hyunbar7771 小时前
Hermes|飞书 + 腾讯云搭建带记忆的 AI 智能助手
人工智能