深入浅出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]])
相关推荐
不会是要长脑子了吧5 分钟前
ChatGPT 网页端报 “Model not found“
人工智能·chatgpt
史努比的蓝色皮肤16 分钟前
从 ChatGPT 到 Agent :AI 发展脉络
人工智能·chatgpt
kyriewen17 分钟前
我扒了 npm 三年数据:AI 没把依赖变胖,是把包变多了
前端·人工智能·程序员
面包狗AI4S22 分钟前
ChatGPT/Codex Windows:本地桌面端应用离线包安装与免安装启动方法(无需管理员权限)
人工智能·windows·ai·chatgpt
龙粤GEO23 分钟前
RAG检索机制如何影响AI引用?一次SaaS品牌GEO优化实战复盘
人工智能
编码小哥24 分钟前
YOLO26深度解析:为边缘计算而生的新一代实时视觉模型
人工智能·边缘计算
前端.火鸡31 分钟前
Embedding:机器是怎么“理解“语义的
人工智能·embedding
AI语宙漫游指南32 分钟前
Opus 5.5 那种代码动画,国产模型加个 Skill 也能做?
人工智能·agent
Moono14534 分钟前
一文搞懂API网关和Ingress区别:MAI Gateway vs 主流方案横评
人工智能
桃西西呀42 分钟前
LangGraph4j之八:条件边与动态路由
人工智能·llm·ai编程