当前位置:网站首页>Tensor ellipsis (three points) slice
Tensor ellipsis (three points) slice
2022-07-03 14:53:00 【swust_ fang】
Checking these three points means ellipsis
type(...)
<class 'ellipsis'>
It means automatically judging the dimension in the process of slicing , Basically, according to the total size- Number of commas , Therefore, two ellipsis will not appear in the slicing operation , For example :
a = torch.randn(3,4,5,6,7,requires_grad=True)
a.shape
>>>torch.Size([3, 4, 5, 6, 7])
a[...,0].shape
>>>torch.Size([3, 4, 5, 6])
a[0,...,0].shape
>>>torch.Size([4, 5, 6])
a[0,1,...,0,0].shape
torch.Size([5])
>>>a[0,...].shape
torch.Size([4, 5, 6, 7])
边栏推荐
- .NET六大设计原则个人白话理解,有误请大神指正
- Adobe Premiere Pro 15.4 has been released. It natively supports Apple M1 and adds the function of speech to text
- 7-10 stack of hats (25 points) (C language solution)
- Rasterization: a practical implementation (2)
- Luogu p5194 [usaco05dec]scales s solution
- Joomla! CMS 3.0~3.4.6 RCE
- Open under vs2019 UI file QT designer flash back problem
- [ue4] Niagara's indirect draw
- Amazon, express, lazada, shopee, eBay, wish, Wal Mart, Alibaba international, meikeduo and other cross-border e-commerce platforms evaluate how Ziyang account can seize traffic by using products in th
- Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
猜你喜欢
4-29——4.32
QT program font becomes larger on computers with different resolutions, overflowing controls
远程服务器后台挂起 nohup
Tonybot humanoid robot infrared remote control play 0630
4-20-4-23 concurrent server, TCP state transition;
C # realizes the login interface, and the password asterisk is displayed (hide the input password)
Niuke: crossing the river
Devaxpress: range selection control rangecontrol uses
[opengl] advanced chapter of texture - principle of flowmap
复合类型(自定义类型)
随机推荐
QT program font becomes larger on computers with different resolutions, overflowing controls
C language to implement a password manager (under update)
tonybot 人形机器人 红外遥控玩法 0630
retrofit
Joomla! CMS 3.0~3.4.6 RCE
Zzuli:1055 rabbit reproduction
4-33--4-35
2021-10-16 initial programming
2022/02/14
NOI OPENJUDGE 1.6(09)
Zzuli: sum of 1051 square roots
How to query the baby category of tmall on Taobao
Qt development - scrolling digital selector commonly used in embedded system
5.4-5.5
Zzuli:1041 sum of sequence 2
NOI OPENJUDGE 1.4(15)
B2020 points candy
Pyqt interface production (login + jump page)
Zzuli:1058 solving inequalities
复合类型(自定义类型)