深入浅出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]])
相关推荐
码农飞哥8 小时前
WorkBuddy 六步,把每天点的几十下做成扩展
人工智能·效率·ai工具·workbuddy
aimartec8 小时前
跨城定制软件与APP开发技术选型与源码验收规范(中小企业实用版)
人工智能
Joy T9 小时前
Spring Security 从 Acegi 到 AI Agent——JWT、角色鉴权与异步任务安全实战
人工智能·安全·spring·spring security·json web token·securitycontext·多次鉴权
AIHR数智引擎10 小时前
拆掉“关键人依赖”:黄仁勋复职全员会上的四道组织切口
人工智能·经验分享·职场和发展·ai-native·英伟达·aihr
Flynn Liang10 小时前
全栈实战:从零搭建一套可落地的生产级 AI 智能体系统(Redis 版)
人工智能·redis·ai agent
小九九的爸爸10 小时前
为了收第一笔钱,我终于打通OPC支付链路
人工智能·程序员·全栈
kyriewen10 小时前
我写的 12 个 AI Skill,三个月后 8 个在吃空饷
javascript·人工智能·程序员
陆枫Larry10 小时前
MCP 实践(二):让自己开发的 MCP Server 调用真实 HTTP 接口
人工智能
阿里云大数据AI技术10 小时前
从空间圈选到区域决策:EMR Serverless StarRocks(Stella)的 GIS 架构与空间索引实践
人工智能
掘金酱11 小时前
X-Lab 年度大会线上同步活动 | 带上你的 AI 作品,来 X-Lab 年度大会聊聊 AI 新生意!
人工智能