深入浅出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]])
相关推荐
冬奇Lab8 小时前
Agent 系列(19):Harness 完整体系——8 层防护框架全景
人工智能·llm·agent
米小虾8 小时前
Claude Fable 5 系统提示词被扒出来了:1586 行代码背后,藏着 AI 产品工程的终极哲学
人工智能·agent
云烟成雨TD8 小时前
Spring AI Alibaba 1.x 系列【77】执行取消
java·人工智能·spring
Teacher.chenchong8 小时前
AI-Agent2.0 科研全链路实战营:LLM+NotebookLM + 自动化编程 + 文献管理 + 论文写作,搭建本地科研智能体
人工智能·自动化
weberCd8 小时前
ChatGPT 实用技巧总结(国内)
人工智能·chatgpt
我爱cope8 小时前
【Agent智能体26 | 多智能体-多智能体工作流】
人工智能·设计模式·语言模型·职场和发展
祭曦念9 小时前
古诗小集开发实战:从零开发一款 HarmonyOS 古诗鉴赏应用
pytorch·深度学习·harmonyos
吴佳浩9 小时前
炸裂!!!给 codeX 装上本地大脑:cc-switch_Ollama 接入全记录
人工智能·rust·openai
一拳小和尚LXY9 小时前
AI 模型 API 对接方案对比:统一网关 vs 直连厂商,2026 年选型指南
人工智能
Bode_20029 小时前
共创经济实现路径
人工智能·制造·供应链