当前位置:网站首页>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
边栏推荐
- Yboj mesh sequence [Lagrange interpolation]
- Exercise and health
- Mindjet mindmanager2022 mind map decompression installer tutorial
- 2022-2028 global public address fire alarm system industry research and trend analysis report
- C#生成putty格式的ppk文件(支持passphrase)
- Shift operators
- 2022-2028 global PTFE lined valve industry research and trend analysis report
- 问题解决:如何管理线程私有(thread_local)的指针变量
- Gavin's insight on the transformer live broadcast course - rasa project's actual banking financial BOT Intelligent Business Dialogue robot system startup, language understanding, dialogue decision-mak
- Length of the longest integrable subarray
猜你喜欢

Shift operators

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

Basic knowledge of Embedded Network - introduction of mqtt

Two-stage RO: part 1

第53章 从业务逻辑实现角度整体性理解程序
![[daily record] - bug encountered in BigDecimal division operation](/img/82/3105586841076b9bb1c57eac221ddf.png)
[daily record] - bug encountered in BigDecimal division operation

Metauniverse and virtual reality (II)

MySQL variables, stored procedures and functions

Mindjet mindmanager2022 mind map decompression installer tutorial

left join左连接匹配数据为NULL时显示指定值
随机推荐
The question of IBL precomputation is finally solved
关于Unity一般的输入操作方式
2022-2028 global public address fire alarm system industry research and trend analysis report
Left join displays the specified value when the left join matching data is null
2022-2028 global elevator emergency communication system industry research and trend analysis report
合适的工作就是好工作
From January 11, 2007 to January 11, 2022, I have been in SAP Chengdu Research Institute for 15 years
【2023联发科提前批笔试题】~ 题目及参考答案
Get to know the drawing component of flutter - custompaint
Interface documentation system - Yapi
Yboj mesh sequence [Lagrange interpolation]
Metauniverse and virtual reality (II)
2022-2028 global PTFE lined valve industry research and trend analysis report
ArrayList analysis 1-cycle, capacity expansion, version
实验八 T-sql,存储过程
SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
The principle of journal node
Length of the longest integrable subarray
2022 is half way through. It's hard to make money
Authentication principle of Ranger plug-in