深入浅出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]])
相关推荐
人工智能AI技术7 小时前
RAG退潮,「文件系统+grep」回归:智能体检索的返璞归真
人工智能
tq10868 小时前
AI转型的责任——个体、机构与政府的协同
人工智能
海兰8 小时前
【实战】OpenClaw调用本地部署的Nacos注册的Library MCP 服务
人工智能·openclaw
青稞社区.8 小时前
Claude Code 源码深度解析:运行机制与 Memory 模块详解
大数据·人工智能·elasticsearch·搜索引擎·agi
weixin_446260858 小时前
提升开发效率的超能力:Superpowers 开源项目介绍
人工智能
无垠的广袤8 小时前
【Titan RA8P1 Board】MNIST 数字识别
人工智能·单片机·瑞萨·mnist·数字识别·ra8p1·ruhmi
witAI8 小时前
手机生成剧本杀软件2025推荐,创新剧情设计工具助力创作
人工智能·python
人工智能AI技术8 小时前
2026年AI编程新范式:“渐进式Spec“
人工智能
砍材农夫8 小时前
spring-ai 第三结构化输出
java·人工智能·spring
tHeya06II8 小时前
.NET AI 核心构建块:重塑智能应用开发的架构范式与生态
人工智能·架构·.net