深入浅出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]])
相关推荐
阿寻寻15 小时前
【人工智能学习-20260608】什么是生成式AI?
人工智能·学习
kTR2hD1qb15 小时前
AI助手如何重塑开发工作流
人工智能
Hali_Botebie15 小时前
变分推断(Variational Inference, VI)数学角度,以及结合神经网络的形式
人工智能·神经网络·机器学习
咖啡星人k15 小时前
MonkeyCode 私有化部署实战:企业内网AI开发环境搭建全流程
人工智能·monkeycode
lqqjuly15 小时前
一致性模型深度解析
人工智能·深度学习·算法
cxr82815 小时前
基于人工智能的超材料逆向设计
人工智能·材料逆向设计合成
霸道流氓气质15 小时前
Spring AI Alibaba Skills 完整实战:从零构建智能会议助手
java·人工智能·spring
眠りたいです16 小时前
LangChainv1:agent快速上手与中间件认识
人工智能·python·中间件·langchain·langgraph
JJJennie77716 小时前
从苹果 2026 落地场景,看系统级 Agent 时代的隐私边界与 MAI Gateway 的企业Token治理
人工智能·gateway·apple
甲维斯16 小时前
我超!Claude Fable真来了,比Mythos还强?!
人工智能