当前位置:网站首页>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六大设计原则个人白话理解,有误请大神指正
- 4-33--4-35
- Detailed explanation of four modes of distributed transaction (Seata)
- pyQt界面制作(登录+跳转页面)
- Zzuli:1058 solving inequalities
- Devaxpress: range selection control rangecontrol uses
- The picture quality has been improved! LR enhancement details_ Lightroom turns on AI photo detail enhancement: picture clarity increases by 30%
- How does vs+qt set the software version copyright, obtain the software version and display the version number?
- Zzuli:1052 sum of sequence 4
猜你喜欢

Dllexport et dllimport

Byte practice plane longitude 2
![Luogu p4047 [jsoi2010] tribal division solution](/img/7f/3fab3e94abef3da1f5652db35361df.png)
Luogu p4047 [jsoi2010] tribal division solution

QT - draw something else

Tonybot humanoid robot starts for the first time 0630

Introduction to opengl4.0 tutorial computing shaders

dllexport和dllimport

零拷贝底层剖析

Qt development - scrolling digital selector commonly used in embedded system

Puzzle (016.3) is inextricably linked
随机推荐
Zzuli:1055 rabbit reproduction
ASTC texture compression (adaptive scalable texture compression)
Find books ()
adc128s022 ADC verilog设计实现
Puzzle (016.4) domino effect
Tencent internship interview sorting
零拷贝底层剖析
Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
5-1 blocking / non blocking, synchronous / asynchronous
Optical cat super account password and broadband account password acquisition
How to query the baby category of tmall on Taobao
4-20-4-23 concurrent server, TCP state transition;
Plane vector addition
Tensor 省略号(三个点)切片
[ue4] HISM large scale vegetation rendering solution
Some concepts about agile
To improve efficiency or increase costs, how should developers understand pair programming?
PHP GD image upload bypass
Zzuli:1048 factorial table
Zzuli: sum of 1051 square roots