深入浅出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]])
相关推荐
0x3F(小茶)12 小时前
Tokenization(分词算法):一切大语言模型的地基
人工智能·算法·语言模型
MartinYeung512 小时前
[论文学习]ChainWatch:面向MCP-Based AI智能体系统中多步攻击的杀伤链对齐序贯检测框架
人工智能·学习
集萃智造机器人12 小时前
集萃智造采摘机器人:以具身智能破解果蔬采收难题,助力智慧农业升级
人工智能·机器人
fīɡЙtīиɡ ℡12 小时前
AI 应用评测体系
人工智能·学习
新芒15 小时前
AI Agent进入独立站:店匠Shoplazza主Agent Athena如何重构经营?
人工智能·重构
chuan.bai18 小时前
Java RAG 实战(第 11 篇):RAG 知识工作台网页
java·开发语言·人工智能
fthux21 小时前
招聘季实测:我用 TraeWork 搭了一套 AI 简历初筛系统
人工智能·ai编程·trae
SLD_Allen21 小时前
NVIDIA KAI Scheduler深度解析——Kubernetes原生AI调度器的架构、原理与实践
人工智能·架构·kubernetes