当前位置:网站首页>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])
边栏推荐
- 556. The next larger element III: simple construction simulation questions
- 4-33--4-35
- Optical cat super account password and broadband account password acquisition
- B2020 分糖果
- Introduction to opengl4.0 tutorial computing shaders
- Yolov5进阶之八 高低版本格式转换问题
- NOI OPENJUDGE 1.6(09)
- [ue4] material and shader permutation
- Table of mathematical constants by q779
- 提高效率 Or 增加成本,开发人员应如何理解结对编程?
猜你喜欢

C # realizes the login interface, and the password asterisk is displayed (hide the input password)

Use of form text box (I) select text

Bucket sorting in C language

My QT learning path -- how qdatetimeedit is empty

创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03

Solve the problem that PR cannot be installed on win10 system. Pr2021 version -premiere Pro 2021 official Chinese version installation tutorial
![[graphics] real shading in Unreal Engine 4](/img/8d/53775c7570c5578f4fe985592bb305.jpg)
[graphics] real shading in Unreal Engine 4

分布式事务(Seata) 四大模式详解

Sub GHz wireless solution Z-Wave 800 Series zg23 SOC and zgm230s modules

零拷贝底层剖析
随机推荐
Zzuli:1043 max
Zhejiang University Edition "C language programming (4th Edition)" topic set reference ideas set
556. The next larger element III: simple construction simulation questions
Rasterization: a practical implementation (2)
Class part2
【7.3】146. LRU caching mechanism
Address book sorting
7-3 rental (20 points)
Several sentences extracted from the book "leather bag"
Get permissions dynamically
tonybot 人形机器人 首次开机 0630
pyQt界面制作(登录+跳转页面)
[opengl] bone animation blending effect
To improve efficiency or increase costs, how should developers understand pair programming?
B2020 points candy
Pytorch深度学习和目标检测实战笔记
光猫超级账号密码、宽带账号密码 获取
远程服务器后台挂起 nohup
4-20-4-23 concurrent server, TCP state transition;
[graphics] hair simulation in tressfx