深入浅出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]])
相关推荐
C^h10 分钟前
pytorch 适合初学者 0基础学习
人工智能·pytorch·python
Rocky Ding*25 分钟前
【三年面试五年模拟】2026-09-06 拼多多 AI Agent研发岗秋招笔试4道算法题完整题解
论文阅读·人工智能·深度学习·机器学习·aigc·ai-native·拼多多
小柯南敲键盘31 分钟前
跨马翻译:AI批量图片翻译工具,跨境电商视频字幕翻译与智能抠图一体搞定
人工智能·python·音视频
luckystar513~1 小时前
Geo + AI:【时空智能体】技术剖析
人工智能·ai·gis·geoai·空间智能体·时空智能体
吨吨ai1 小时前
2026年9月8日|GPT‑6 Astra + Codex:Pro 开发者的 AI Agent 工具链
人工智能·gpt
leoZ2311 小时前
2026-09-09-springboot-cloud-deploy-pitfalls
java·前端·javascript·vue.js·人工智能·spring boot·后端
dozenyaoyida2 小时前
AI与大模型新闻日报 | 2026-09-09
人工智能·ai·chatgpt·大模型·新闻
xqqxqxxq2 小时前
AI Agent学习:主动工具发现(李博杰《深入理解 AI Agent》4.8观后总结)
人工智能·学习
海上彼尚2 小时前
Cursor 模型的强度实测排行
前端·人工智能·后端
ai小陈2 小时前
PyTorch Profiler性能分析实战:定位GPU训练中的慢算子
人工智能·深度学习·机器学习·ai·性能优化·gpu算力