深入浅出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]])
相关推荐
甲维斯15 小时前
GPT6.2“买家秀”来了,吼吼呵呵!
人工智能
艾莉丝努力练剑16 小时前
【AI大模型接入SDK】C++的SessionManager 线程安全
java·开发语言·前端·c++·人工智能·学习·安全
螺丝钉tina17 小时前
[Playwright] [20][AI] 失败分析:让AI大模型帮你debug
人工智能
MSTcheng.18 小时前
【AI应用实战】用 FastAPI + SSE 做一个自己的 AI 聊天网页:流式输出、多轮对话与完整源码
人工智能·python·大模型·fastapi·sse·ai聊天助手
世冠科技18 小时前
世冠科技GCEAgent重磅发布,开启复杂装备AI原生智能研发新范式
人工智能·科技·ai-native
轻松,带微笑18 小时前
AI竞争进入下半场:微软押注专业模型,通用大模型不再是唯一答案
人工智能·microsoft
哈尔滨张谦蛋18 小时前
兰州大学 · 甘肃省可穿戴装备重点实验室 · 2027年博士招生
人工智能·深度学习
MysTic_Zhong18 小时前
【3】核心引擎:LangGraph 编排与多路召回重排
人工智能·agent
vivo互联网技术18 小时前
研发数字人 Agent:从 0 到 1 的架构与实践
人工智能·agent·mcp