深入浅出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]])
相关推荐
SeatuneWrite7 分钟前
**AI仿真人剧工具2025推荐,解锁沉浸式互动叙事新体验*
人工智能·python
l1t8 分钟前
利用网易有道龙虾调用ollama本地模型生成幻灯片内容
人工智能·爬虫
b1ue1ue1ue10 分钟前
LLM Note
人工智能
小雨中_20 分钟前
2.1 PaLM 及其变体(PaLM / PaLM 2)
人工智能·深度学习·机器学习·分类·数据挖掘·palm
pccai-vip21 分钟前
OpenClaw(原名 Clawdbot/Moltbot)正处于从“聊天助手”向“自主智能体(Agent)”转型的关键期
人工智能
一个努力编程人30 分钟前
NLP 领域————BERT算法
人工智能·自然语言处理·bert
aircrushin33 分钟前
Gemini 3.1 Pro架构深度解析与AGI能力评测
人工智能
deephub34 分钟前
并行多智能体系统的协调测试实战:从轨迹捕获到CI/CD的六个步骤
人工智能·ci/cd·大语言模型·aiagent
yunhuibin37 分钟前
LeNet、AlexNet、VGGNet、NiN总结
人工智能·python·深度学习·神经网络
Emotional。42 分钟前
AI Agent 开发实战:用 LangChain 构建智能邮件助手
linux·服务器·网络·人工智能·python·langchain