深入浅出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]])
相关推荐
rebekk4 分钟前
Hydra介绍
人工智能·python
我不是小upper5 分钟前
从理论到代码:随机森林 + GBDT+LightGBM 融合建模解决回归问题
人工智能·深度学习·算法·随机森林·机器学习·回归
Faker66363aaa9 分钟前
CornerNet-Hourglass104生产线检测与分类-1模型训练与部署
人工智能·分类·数据挖掘
YANshangqian11 分钟前
高性能AI聊天工具
人工智能
拾贰_C12 分钟前
【python | pytorch | warehouse】python库scipy与scikit-learn库不兼容?
pytorch·python·scipy
donecoding12 分钟前
前端AI开发:为什么选择SSE,它与分块传输编码有何不同?axios能处理SSE吗?
前端·人工智能
安徽正LU o561-6o623o714 分钟前
露-Y迷宫刺激器 AI人工智能Y迷宫
人工智能
说私域18 分钟前
基于开源AI智能名片链动2+1模式S2B2C商城小程序的社群初期运营策略研究
人工智能·小程序