深入浅出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]])
相关推荐
SmartRadio1 分钟前
在CH585M代码中如何精细化配置PMU(电源管理单元)和RAM保留
linux·c语言·开发语言·人工智能·单片机·嵌入式硬件·lora
旦莫6 分钟前
Pytest教程:Pytest与主流测试框架对比
人工智能·python·pytest
●VON11 分钟前
从模型到价值:MLOps 工程体系全景解析
人工智能·学习·制造·von
智慧地球(AI·Earth)32 分钟前
Codex配置问题解析:wire_api格式不匹配导致的“Reconnecting...”循环
开发语言·人工智能·vscode·codex·claude code
GISer_Jing37 分钟前
AI:多智能体协作与记忆管理
人工智能·设计模式·aigc
qq_4112624241 分钟前
纯图像传感器(只出像素),还是 Himax WiseEye/WE1/WE-I Plus 这类带处理器、能在端侧跑模型并输出“metadata”的模块
人工智能·嵌入式硬件·esp32·四博智联
InfiSight智睿视界1 小时前
门店智能体技术如何破解美容美发连锁的“标准执行困境”
大数据·运维·人工智能
Toky丶1 小时前
【文献阅读】BitNet Distillation
人工智能
LaughingZhu1 小时前
Product Hunt 每日热榜 | 2026-01-09
人工智能·经验分享·神经网络·搜索引擎·产品运营
莫非王土也非王臣1 小时前
卷积神经网络与应用
人工智能·神经网络·cnn