深入浅出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]])
相关推荐
神经蛙19961 分钟前
我用 TRAE Work 做周报:从 4 小时到 45 分钟的完整实操,建议收藏
人工智能
测不准2 分钟前
终端日志还在手抄 ANSI 颜色码么?这个 VS Code 插件让你像选主题一样配颜色
人工智能
kuinnebula11 分钟前
知识图谱skill
人工智能·知识图谱
DS随心转小程序20 分钟前
实测评测 AI 导出鸭转化效能,全方位优化 DeepSeek 输出 word 文档落地使用效率
人工智能·aigc·word·豆包·deepseek·ai导出鸭
哈尔ai20 分钟前
别让模型接口成为参数黑洞:Spring MVC 请求绑定、校验与错误契约实战
人工智能
ONEYAC唯样23 分钟前
唯样-AI时代,MLCC迎来第二个黄金十年
人工智能
szxinmai主板定制专家30 分钟前
基于Zynq MPSoC的多路GMSL相机同步采集与低延迟图像预处理系统|车载视觉高速解决方案
人工智能·zynq·gmsl·rk3588+fpga·rk3576+fpga
王莎莎34 分钟前
科研 Agent 先别急着搜:为什么 schema discovery 才是工作流的第一步
人工智能
zhulin102834 分钟前
用 TRAE Work 3 小时的工作量,压缩到 20 分钟
人工智能
不加辣椒36 分钟前
第10章:上下文工程系统架构设计
人工智能