zxjzxj9 / pytorchintroduction Goto Github PK
View Code? Open in Web Editor NEW《深入浅出 PyTorch——从模型到源码》源代码和勘误(见Issues)
License: BSD 3-Clause "New" or "Revised" License
《深入浅出 PyTorch——从模型到源码》源代码和勘误(见Issues)
License: BSD 3-Clause "New" or "Revised" License
版次:2022年4月第一版
印次:2022年1月第10次印刷
最后一句应该改为:有关OrderedDict的介绍,可以参考Python的相关文档。
line 11:
t4 = torch.radnn(3,2) # 沿着最后一个维度做堆叠,返回大小为3×4×3的张量
中“radnn” 应为 “randn”
SSD中只对conv4_3卷积层的输出特征进行了归一化,书中写道“其原因主要是conv4_3的特征和后面几层的张量的数值大小不匹配”
请问为什么数值大小不匹配就需要对输出特征归一化?如果不进行这种归一化会有哪些坏处?
GULE/gelu/setup.py 的第6行“['gelu.cc', 'gelu_kernel.cu'])]”中“gelu_kernel.cu”命名与“GELU/gelu/gelu_cuda.cu”不同,导致编译失败,需要修改任一名称即可。
原文中提到"通过引入批次归一化层,能够让同一批次的某个输入感知到另外批次的信息,这样就能避免同一批次中有大量的图像一致"
根据BN的计算公式,是对 同一批次 的图像在批次维度上做归一化,所以BN的结果似乎是让某个输入感知到 同一批次 的其它输入的信息,为什么这里提到可以让输入感知到 另外批次 的信息?
意图是取负样本中损失函数较大的,但文中代码使用的是
_,idx=cls_loss.sort(1)
升序排列,找出的是负样本中损失函数较小的样本
本条issue都指的是gan.py里的代码
1.第92行noise = torch.randn(batch_size, nz, 1, 1, device=device)
中变量nz
是什么?在gan.py里没找到定义
2.第101行errD = errD_real + errD_fake
是多余的吧?既然是通过errD_real.backward()
和errD_fake.backward()
分别进行反向传播,把errD_real
和 errD_fake
相加得到的errD
在后续也没有使用
如果要使用errD
,等价的代码应该是去掉errD_real.backward()
和errD_fake.backward()
,然后调用errD.backward()
260页,“一个单词相当于 1×N 的向量,而词嵌入相当于对这个向 量做线性变换,乘以 N×M 的矩阵,最后输出 1×N 的向量”,应为“一个单词相当于 1×N 的向量,而词嵌入相当于对这个向 量做线性变换,乘以 N×M 的矩阵,最后输出 1×M 的向量”。感谢读者的指出。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.