深入浅出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]])
相关推荐
爱学习的小白柏7 分钟前
【AI问数技术】多Agent协同架构:查询规划/SQL生成/洞察分析/报告生成
java·网络·人工智能·windows·sql·架构·llama
艾伦_耶格宇13 分钟前
【AI】-4 OpenCode Go 接入 Obsidian 完整指南
运维·开发语言·人工智能·agent·opencode
天天代码码天天14 分钟前
我做了一款简洁轻量的 Windows PDF 阅读器:lw.PDF
人工智能
ITresearchGuest15 分钟前
AI 焦虑下,前端该何去何从
前端·人工智能
Larcher20 分钟前
SDD 项目开发步骤与提示词
人工智能·设计模式·架构
SXkehuirongsheng22 分钟前
APP开发定制和模板开发哪个更实用?
大数据·运维·人工智能
皮卡丘不断更24 分钟前
从遥操作示范到可复现训练:LeRobot 0.6.1 的机器人学习工作流
人工智能·学习·机器人·开源·开发工具
william_yangshun28 分钟前
【AI Agent 实战】omnigent 中文版:统一编排多个编码代理的 meta-harness 上手指南
人工智能
旋生万物37 分钟前
【终极实战】用Python从零“生成“一个宇宙:螺旋干涉模型的代码实现
开发语言·前端·人工智能·react.js·php·wpf
IT_陈寒1 小时前
被Java的final坑惨了,这些细节你可能也忽略了
前端·人工智能·后端