当前位置:网站首页>pytorch常用函数
pytorch常用函数
2022-08-02 05:11:00 【樱花的浪漫】
1.torch.max
(input, dim, keepdim=False, *, out=None)
返回一个命名元组,其中是给定维度中张量 每一行的最大值。并且是找到的每个最大值的索引位置 (argmax)。(values, indices)
values
input
dim
indices
如果keepdim为True,则输出张量与输入张量的大小相同,但维度dim中的输出张量大小为1。否则,dim会被压缩(请参见torch.squege()),导致输出张量的维度比输入张量少1。
边栏推荐
- golang的time包:时间间隔格式化和秒、毫秒、纳秒等时间戳格式输出的方法
- leetcode 665. Non-decreasing Array 非递减数列(中等)
- C语言小游戏——扫雷小游戏
- 测试技术之APP蓝牙连接测试
- Say good woman programmers do testing have an advantage?More than a dozen interview, abuse of cry ~ ~ by the interviewer
- C 竞赛——捕鱼
- leetcode 204. Count Primes 计数质数 (Easy)
- 使用TinkerPop框架对GDB增删改查
- 5款经典代码阅读器的使用方案对比
- ApiPost 真香真强大,是时候丢掉 Postman、Swagger 了
猜你喜欢
随机推荐
21天学习挑战赛安排
金山云团队分享 | 5000字读懂Presto如何与Alluxio搭配
[PSQL] 函数、谓词、CASE表达式、集合运算
软件测试在职2年跳槽4次,你还在怪老板不给你涨薪?
Alluxio为Presto赋能跨云的自助服务能力
高防服务器防御的原理是什么
navicat新建数据库
Contents of encoding-indexes.js file printed with Bluetooth:
Redis database
Say good woman programmers do testing have an advantage?More than a dozen interview, abuse of cry ~ ~ by the interviewer
MySql将一张表的数据copy到另一张表中
C语言中i++和++i在循环中的差异性
C language entry combat (13): decimal number to binary
整合ssm(一)
Constructors, member variables, local variables
ApiPost 真香真强大,是时候丢掉 Postman、Swagger 了
对node工程进行压力测试与性能分析
跨桌面端Web容器演进
Mysql implements optimistic locking
关于web应用的目录结构