深入浅出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]])
相关推荐
Lumistory5 分钟前
从OPPO长安研发中心看头部科技企业的照明运维选择
大数据·运维·人工智能·光照贴图
kolyle6 分钟前
企业大模型私有化部署:从硬件选型到模型服务化的完整路径
人工智能
Dawson Zhu15 分钟前
从理论到工程化:构建可靠Agent系统的六大核心工件与实战指南
人工智能·语言模型·架构·aigc·agi
Blockchina20 分钟前
用 AI 把 30 张照片变成 8 页成长纪念册:一套普通人也能落地的轻量服务流程
人工智能
她的男孩22 分钟前
接口加密做成框架级能力有多难?我扒了 3600 行源码:从 RSA 握手到落库密文迁移
人工智能·后端·架构
天衍四九-38 分钟前
第一章:从 LLM 到 Agent —— DeepSeek Harness 入门
网络·数据库·人工智能·python
RAOY的AI笔记40 分钟前
ChatGPT怎么用得更专业?Prompt工程、API调用与AI Agent工作流实战
人工智能·chatgpt·prompt
ocean21031 小时前
2025-2026年AI提效与实践大厂面试高频问题
人工智能·面试·职场和发展·提示词工程·ai提效
xlq223221 小时前
Ai大模型接入day 6
人工智能