深入浅出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]])
相关推荐
rain_sxr几秒前
视口之外不渲染:IntersectionObserver 懒加载与组件卸载回收
人工智能
wp123_12 分钟前
智能座舱与AI终端模式切换:精密滑动开关选型与验证
人工智能
数智工坊9 分钟前
RehearseVLA深度解析:基于物理一致世界模型的VLA强化学习后训练框架
人工智能·深度学习·3d·机器人
林小卫很行10 分钟前
WorkBuddy 入门:为什么推荐腾讯出的这个 AI 助手
人工智能·程序员
our_times14 分钟前
豆包与抖音联动效果展示大纲
人工智能
刘一说15 分钟前
AI科技热点日报 | 2026年07月21日
人工智能·科技
阿黎梨梨15 分钟前
大模型是怎么“随机说话”的?手把手带你控制它的“嘴”
人工智能
苏醒的人生20 分钟前
AI 视频工具最强迭代!Seedance 2.5在哪里下载使用?即梦AI即将全球首发
人工智能
AI大模型-小雄20 分钟前
Codex 测试总跑不完怎么办?补 Credits 还是升级 Pro
人工智能·chatgpt·提示词·codex·ai办公·chatgpt pro·credits
Am-Chestnuts25 分钟前
AI长回答批量导出PDF与长图:多轮内容整理和免费Markdown备份
人工智能·pdf·aigc