深入浅出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]])
相关推荐
Are_You_Okkk_13 小时前
适配集团/事业部/扁平化组织:开源知识库的落地策略与价值
人工智能·架构·开源
新缸中之脑13 小时前
LLM训练数据集简介
人工智能
hqyjzsb13 小时前
AI产品经理成长路径:如何从零打造属于自己的AI项目经验。
人工智能·职场和发展·产品经理·创业创新·学习方法·信息与通信·业界资讯
AngelPP13 小时前
软件的下一个用户不是人类,而是 Agent
人工智能
·中年程序渣·13 小时前
Spring AI Alibaba入门学习(五)
人工智能·学习
愣锤13 小时前
深入分析OpenClaw爆火出圈的根本原因
人工智能·openai·agent
RuiBo_Qiu13 小时前
【LLM进阶-Agent】9. self-discover Agent 介绍
人工智能·ai-native
阿拉斯攀登13 小时前
记忆的困境:RNN 与 LSTM 的底层逻辑
人工智能·rnn·深度学习·ai·大模型·llm·lstm
乱世刀疤14 小时前
云主机ubuntu24上安装openclaw后配置飞书通道
人工智能·openclaw
irpywp14 小时前
拒绝 AI 盲目梭哈:拆解 Garry Tan 的 gstack 架构逻辑
人工智能·架构