Code Monkey home page Code Monkey logo

pytorchintroduction's Issues

勘误 ex_2_16.py

line 11:
t4 = torch.radnn(3,2) # 沿着最后一个维度做堆叠,返回大小为3×4×3的张量
中“radnn” 应为 “randn”

<勘误> 2.4.1 PyTorch 的主要模块

  1. torch.nn.functional 函数模块中这一小节中,“定义了一些核神经网络相关的函数”,应该为”定义了一些和神经网络相关的函数“。

关于4.4.2节SSD特征归一化的疑惑

SSD中只对conv4_3卷积层的输出特征进行了归一化,书中写道“其原因主要是conv4_3的特征和后面几层的张量的数值大小不匹配
请问为什么数值大小不匹配就需要对输出特征归一化?如果不进行这种归一化会有哪些坏处?

第8章 GELU代码错误

GULE/gelu/setup.py 的第6行“['gelu.cc', 'gelu_kernel.cu'])]”中“gelu_kernel.cu”命名与“GELU/gelu/gelu_cuda.cu”不同,导致编译失败,需要修改任一名称即可。

(疑惑)关于4.7.4节中提到BN在GAN中的作用

原文中提到"通过引入批次归一化层,能够让同一批次的某个输入感知到另外批次的信息,这样就能避免同一批次中有大量的图像一致"
根据BN的计算公式,是对 同一批次 的图像在批次维度上做归一化,所以BN的结果似乎是让某个输入感知到 同一批次 的其它输入的信息,为什么这里提到可以让输入感知到 另外批次 的信息?

4.4.5节的SSD损失函数应该有误

意图是取负样本中损失函数较大的,但文中代码使用的是
_,idx=cls_loss.sort(1)
升序排列,找出的是负样本中损失函数较小的样本

关于代码仓库Chapter4中gan.py的几点疑惑

本条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()

<勘误> 5.2 词嵌入层

260页,“一个单词相当于 1×N 的向量,而词嵌入相当于对这个向 量做线性变换,乘以 N×M 的矩阵,最后输出 1×N 的向量”,应为“一个单词相当于 1×N 的向量,而词嵌入相当于对这个向 量做线性变换,乘以 N×M 的矩阵,最后输出 1×M 的向量”。感谢读者的指出。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.