当前位置:网站首页>pytorch编程知识(2)
pytorch编程知识(2)
2022-07-01 00:37:00 【Wsyoneself】
- num_worker(指dataloader创建的工作进程数)
- GE2E:Speaker Verification(验证输入的一段语音是否属于一个特定speaker的任务)损失函数,端到端损失函数,收敛速度快、实现简单
torch.gather():从批量tensor中取出指定乱序索引下的数据
array 转为tensor:torch.from_numpy()
二维tensor转置:tensor = torch.transpose(tensor, dim0=0, dim1=1)
pytorch中卷积后保证图像输入输出前后的尺寸大小不变,即实现TensorFlow中“same”的效果:
若卷积核大小为3x3,那么就应该设定padding=1,即填充1层边缘像素;
若卷积核大小为7x7,那么就应该设定padding=3,填充3层边缘像素;
也就是padding大小一般设定为核大小的一半(向下取整)。
调试网络时,查看张量tensor形状shape:
emb.detach().cpu().numpy()
解释:detach():将tensor从计算图中脱离出来,cpu()将放置到cuda上的tensor转换到cpu上(因为只有cpu上的tensor才可以调用numpy),将tensor转为array
边栏推荐
- 魔王冷饭||#101 魔王解惑数量多与质量;员工管理;高考志愿填报;游戏架构设计
- Host FL Studio fruit music production daw20.9
- 获取屏幕高度
- MySQL variables, stored procedures and functions
- [daily record] - bug encountered in BigDecimal division operation
- 给按钮的边框和文字设置不同的背景色
- Set different background colors for the border and text of the button
- Luogu p1168 median
- Member management applet actual development 07 page Jump
- MySQL storage engine
猜你喜欢

20220215-ctf-misc-buuctf-einstein-binwalk analyze picture-dd command separate zip file -- look for password in picture attribute

Oracle table creation and management
![[untitled]](/img/96/7f26614bbdcce71006e38ee34ab216.jpg)
[untitled]

Two-stage RO: part 1

Vnctf 2022 cm CM1 re reproduction

Chapter 53 overall understanding of procedures from the perspective of business logic implementation

优质的水泵 SolidWorks模型素材推荐,不容错过

Oracle临时表详解

NE555波形发生器手把手教程之NE555内部结构(一)

Pytorch auto derivation
随机推荐
剑指 Offer 18. 删除链表的节点
Two-stage RO: part 1
Is the public read-only field with immutable structure valid- Does using public readonly fields for immutable structs work?
NE555波形发生器手把手教程之NE555内部结构(一)
How to specify the number of cycles in JSTL- How to loop over something a specified number of times in JSTL?
A letter to 5000 fans!
实验八 T-sql,存储过程
Share your own terminal DIY display banner
New content violation degree determination scana bad information monitoring capability update issue 5
Basic data structure of redis
How to scroll uitableview to a specific position - how to scroll uitableview to specific position
写给 5000 粉丝的一封信!
Plot size and resolution with R markdown, knitr, pandoc, beamer
High quality pump SolidWorks model material recommended, not to be missed
Packing and unpacking of C #
IBL预计算的疑问终于解开了
Ybtoj exchange game [tree chain splitting, line segment tree merging]
2022-2028 global public address fire alarm system industry research and trend analysis report
Authentication principle of Ranger plug-in
Error msb8031: building an MFC project for a non Unicode character set is deprecated