Python torch.argmax()怎么使用
发表于:2024-10-25 作者:千家信息网编辑
千家信息网最后更新 2024年10月25日,本篇内容主要讲解"Python torch.argmax()怎么使用",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"Python torch.argmax(
千家信息网最后更新 2024年10月25日Python torch.argmax()怎么使用
本篇内容主要讲解"Python torch.argmax()怎么使用",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"Python torch.argmax()怎么使用"吧!
代码实验展示:
Microsoft Windows [版本 10.0.18363.1256](c) 2019 Microsoft Corporation。保留所有权利。C:\Users\chenxuqi>conda activate ssd4pytorch2_2_0(ssd4pytorch2_2_0) C:\Users\chenxuqi>pythonPython 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32Type "help", "copyright", "credits" or "license" for more information.>>> import torch>>> torch.manual_seed(seed=20200910)>>>>>> a = torch.randn(4, 4)>>> atensor([[ 0.5816, 2.0060, 1.6013, -0.6379],[-1.1943, 0.1426, 1.3612, -1.4171],[-2.7679, 2.1961, 1.3462, -0.7650],[ 1.5528, 0.7210, -0.1314, 0.1448]])>>> torch.argmax(a)tensor(9)>>>>>> torch.manual_seed(seed=20200910) >>>>>> a = torch.randn(4, 5)>>> torch.argmax(a, dim=1)tensor([1, 3, 1, 4])>>> torch.argmax(a, dim=0)tensor([2, 2, 0, 1, 3])>>> atensor([[ 0.5816, 2.0060, 1.6013, -0.6379, -0.4996],[ 0.2791, -0.5900, 0.2527, 0.2797, -0.5316],[ 0.6480, 2.6538, -0.2797, -1.3232, -0.8263],[-0.4343, -0.2370, -1.7016, -0.2565, 1.4568]])>>>>>>>>>
到此,相信大家对"Python torch.argmax()怎么使用"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
内容
学习
实用
更深
代码
兴趣
实用性
实际
操作简单
方法
更多
朋友
权利
版本
网站
频道
实验
查询
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
大拇哥网络技术有限公司
国家网络安全宣传周是9月
广州网络安全宣传周
web服务器 云服务器
护苗网络安全课新闻
synology服务器
JAVA版mc加入服务器
剑三转移到其他服务器再转换
软件开发c盘要多大
上海企业软件开发大概多少钱
近五年内网络安全事件
哪个数据库可以看同行评议
厦门晶屿夏软件开发有限公司
钱冬云教授数据库应用技术
网络安全红线制定的依据是什么
三级网络技术证书什么
软件开发怎么摊销
软件开发遇到那些问题
数据库表中的多对多关系描述
魔兽世界新服务器时间表
怎样监测无线网络安全
校园网组建网络技术介绍
深圳直播软件开发价格表
辽宁众盟网络技术有限公司
企事业单位网络安全部署
服务器提示内存不足
服务器 租 安全
宇宙互联网科技有限公司
俄罗斯自主数据库
三级网络技术证书什么