深入浅出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]])
相关推荐
神奇小汤圆6 小时前
LLM 记忆系统:从 Markdown 知识库到 Self-Governing Repo
人工智能
黑暗森林观察者7 小时前
Gemini 3.5 Flash 把"操作电脑"塞进了模型——AI从"能说"到"能动手"
人工智能·gemini
埃菲尔铁桶7 小时前
我和大模型一起做了个本地知识库——用户也是我和大模型
人工智能·ai编程
To_OC7 小时前
跑通一遍 Tool Call 后,我终于搞懂大模型是怎么调用工具的
人工智能·aigc·agent
Mintimate8 小时前
用 EdgeOne Makers 构建与托管 Agent:从 RAG 检索到智能助手
人工智能·agent
早点睡啊9 小时前
精读 LangChain 官方文档(二)Model 篇:把模型调用升级成工程化推理接口
人工智能·langchain
vivo互联网技术10 小时前
未来,什么才是 AI“正确的使用方式”
人工智能·ai编程
甲维斯11 小时前
豆包Seed2.1Pro编程能力测试!
人工智能·ai编程
Zy宇11 小时前
从养 OpenClaw 到养社区 AI:一套 Multi-Agent 社区的设计思路
人工智能·ai