当前位置:网站首页>Pytorch programming knowledge (2)
Pytorch programming knowledge (2)
2022-07-01 01:20:00 【Wsyoneself】
- num_worker( finger dataloader Number of worker processes created )
- GE2E:Speaker Verification( Verify whether the input speech belongs to a specific speaker The task of ) Loss function , End to end loss function , Fast convergence 、 Implement a simple
torch.gather(): From batch tensor Extract the data under the specified out of order index
array To tensor:torch.from_numpy()
A two-dimensional tensor Transposition :tensor = torch.transpose(tensor, dim0=0, dim1=1)
pytorch After middle convolution, the size of the image before and after input and output is guaranteed to remain unchanged , I.e. implementation TensorFlow in “same” The effect of :
If convolution kernel size is 3x3, Then it should be set padding=1, I.e. filling 1 Layer edge pixels ;
If convolution kernel size is 7x7, Then it should be set padding=3, fill 3 Layer edge pixels ;
That is to say padding The size is usually set to half the size of the core ( Rounding down ).
When debugging the network , Look at the tensor tensor shape shape:
emb.detach().cpu().numpy()
explain :detach(): take tensor Break away from the calculation diagram ,cpu() Place in cuda Upper tensor The switch to cpu On ( Because only cpu Upper tensor Can be called numpy), take tensor To array
边栏推荐
- User defined annotation implementation verification
- 用Steam教育启发学生多元化思维
- Service
- [LeetCode] 两数之和【1】
- Training discipline principle of robot programming
- Web compatibility testing of software testing
- Hoo research | coinwave production - nym: building the next generation privacy infrastructure
- Practical shell knowledge
- Exploring the road of steam education innovation in the Internet Era
- 06. on several ways of redis persistence
猜你喜欢
Dls-20 double position relay 220VDC
What if the disk of datanode is full?
[go] go implements row column conversion of sets
软件开发完整流程
Exploring the road of steam education innovation in the Internet Era
Technical personnel advanced to draw a big picture of business, hand-in-hand teaching is coming
软硬件基础知识学习--小日记(1)
The quantity and quality of the devil's cold rice 101; Employee management; College entrance examination voluntary filling; Game architecture design
For the first time in more than 20 years! CVPR best student thesis awarded to Chinese college students!
Oracle table creation and management
随机推荐
Dls-20 double position relay 220VDC
Cmu15445 (fall 2019) project 1 - buffer pool details
5. TPM module initialization
【学习笔记】简单dp
Split the linked list [take next first and then cut the linked list to prevent chain breakage]
K210 site helmet
A letter to 5000 fans!
[2023 MediaTek approved the test questions in advance] ~ questions and reference answers
Docker 部署 MySQL 8
Metauniverse and virtual reality (II)
孔乙己第一问之服务通信知多少?
Open3D 点云颜色渲染
mustache语法
Share your own terminal DIY display banner
HDU 2488 A Knight's Journey(DFS)
ArrayList analysis 1-cycle, capacity expansion, version
Analysis of blocktoken principle
闭锁继电器YDB-100、100V
文件服务设计
Xjy-220/43ac220v static signal relay