atcold / nyu-dlsp20 Goto Github PK
View Code? Open in Web Editor NEWNYU Deep Learning Spring 2020
Home Page: https://atcold.github.io/NYU-DLSP20/
License: Other
NYU Deep Learning Spring 2020
Home Page: https://atcold.github.io/NYU-DLSP20/
License: Other
In the last section regarding Variational Autoencoders, the text references the wrong images: line 136, should be Fig. 9(a) instead of 8(a); line 145, should be 9(b); finally, line 149, should be 10 instead of 9.
How can I contribute to the course's translation to the Arabic version? I have searched a lot in the repo about the contribution page, but I can't get it.
On 10-3.md
the last two figures are missing captions:
in week03-2 (caeda33) i fond that the "figures" under pictures aren't translated !!!
It looks like we do not have syntax highlighting, as shown here.
The following image links are broken:
See https://atcold.github.io/pytorch-Deep-Learning/en/week03/03-3/
I think the images were originally obtained from this presentation:
02 - CNN.pdf
See pages 10-11
Also, small suggestions:
Change Figure 4 to include R^7 and R^2 as in Slide 20 .
This would better match the text for Figure 4.
Include Figure (4b maybe?) with that on Slide 21 to show what Padding is doing
a simple test of shear, yellow dots should be in lower right instead of upper right, new_OI is right without transpose
for i in range(1):
# create a random matrix
W = torch.tensor([[1.,0.], [1.,1.]]).to(device)
# transform points
Y = X @ W.t()
# compute singular values
U, S, V = torch.svd(W)
# plot transformed points
show_scatterplot(Y, colors, title='y = Wx, singular values : [{:.3f}, {:.3f}]'.format(S[0], S[1]))
# transform the basis
new_OI = OI @ W
# plot old and new basis
plot_bases(OI)
plot_bases(new_OI)
Hi, there is inconsistency in the name of the figure and how it is indicated in the following explanation.
For example, in figure 5 case, it is actively used to describe the content but it is called figure 19 in the explanation. As the figure itself contains the number, it makes sense, but this hinders a smooth understanding of the lecture note.
I think there are two solutions to this:
<center>
<img src="{{site.baseurl}}/images/week14/14-1/Fig5.png" style="background-color:#DCDCDC;" /><br>
Figure 5.
</center>
A simple example of a factor graph is shown in Figure 19 (top). The energy function is the sum of four factors:
<center>
<img src="{{site.baseurl}}/images/week14/14-1/Fig6.png" style="background-color:#DCDCDC;" /><br>
Figure 6.
</center>
The factor graph shown in Figure 20 is a log domain factor graph for linear structured models ("simple energy-based factor graphs" we are talking about)
In the description of Figure 9, L2 and No-reg have been indicated with different color labels.
- Contrastingly, in L2 regularisation, from the blue peak near zero we can see that most of the weights are close to zero but non-zero.
- When there is no regularisation (lavender) the weights are much more flexible and spread out around zero resembling a normal distribution.
should be
- Contrastingly, in L2 regularisation, from the lavender peak near zero we can see that most of the weights are close to zero but non-zero.
- When there is no regularisation (blue) the weights are much more flexible and spread out around zero resembling a normal distribution.
Just after figure 4 of Vec to Seq, diagram there is this paragraph saying:
Some of the results of this network are shown below. For example, in the first column the description regarding the last picture is “A herd of elephants walking across a dry grass field.”, which is very well refined. Then in the second column, the first image outputs “Two dogs play in the grass.”, while it’s actually three dogs. In the last column are the more wrong examples such as “A yellow school bus parked in a parking lot.”
But below that paragraph, there is no image with those examples, as it is actually shown in the Practicum video, at 4:41
I've got the following error:
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
in 04-spiral_classification.ipynb
in this line:
plot_model(X, y, model)
Seems that only X
is moved to CPU via X = X.cpu()
, but not y
. As workaround it can be fixed like this:
plot_model(X, y.cpu(), model)
Issues in #40.
Put two images of figure 1 into a table.
TYPE THE MATH, do not screenshot it.
Do not scale images with a wrong aspect ratio.
For vectors and matrices use \boldsymbol
.
Matrix dimensions use \times
, not *
or \ast
.
Center the images with <center>
and </center>
.
Fig 6 is badly cropped.
Math functions need to be typed between $
. If non standard math, use \texttt{}
, like for ReLU
.
Fig 7 is old. Please, use drawing from new slides.
More vectors need \boldsymbol
.
The third scriber has done a very good job.
You may ask them for help.
The Katex code in the markdown file of 01-3 doesn't render.
$$
\label{nonlinear_transform}
f(x) = tanh\bigg(\begin{bmatrix} s & 0 \\ 0 & s \end{bmatrix} \bigg)
$$
@ElJAZRY I think there is something wrong in 03.2 page(https://atcold.github.io/pytorch-Deep-Learning/ar/week03/03-2/) ! Please check it and accept my apologies if everything okay🙏🏻.
As Mauri commented in the Spanish slack channel, ALL links are broken on index.md, as they point to .../es/es/...
instead of .../es/...
Eg:
https://atcold.github.io/pytorch-Deep-Learning/es/es/week01/01-1
Index md shows only one es/
<td><a href="es/week01/01-1">Historia y motivación</a></td>
Not sure if we should remove it (as it would point at the main file in english) or some other action is needed.
Other langs seems to have this problem too.
All the lessons have have been recorded.
When I'll get the video, I'll clean them up, upload, and link in the main README.md
.
I highly recommend to go through the "theory" first (watching videos, checking out the slides), so that the "practice" (playing with the notebooks) is straightforward, at least from a conceptual standpoint.
Running on Ubuntu 18.04.1 LTS with two GTX 970s. I get the following error when trying to run the cell that passes X
into a linear transformation in 02-space_stretching.ipynb
:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-6-1cacdc731f63> in <module>
4 model.to(device)
5 with torch.no_grad():
----> 6 Y = model(X)
7 show_scatterplot(Y, colors)
8 plot_bases(model(OI))
~/anaconda3/envs/aims-ml/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
475 result = self._slow_forward(*input, **kwargs)
476 else:
--> 477 result = self.forward(*input, **kwargs)
478 for hook in self._forward_hooks.values():
479 hook_result = hook(self, input, result)
~/anaconda3/envs/aims-ml/lib/python3.6/site-packages/torch/nn/modules/container.py in forward(self, input)
89 def forward(self, input):
90 for module in self._modules.values():
---> 91 input = module(input)
92 return input
93
~/anaconda3/envs/aims-ml/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
475 result = self._slow_forward(*input, **kwargs)
476 else:
--> 477 result = self.forward(*input, **kwargs)
478 for hook in self._forward_hooks.values():
479 hook_result = hook(self, input, result)
~/anaconda3/envs/aims-ml/lib/python3.6/site-packages/torch/nn/modules/linear.py in forward(self, input)
53
54 def forward(self, input):
---> 55 return F.linear(input, self.weight, self.bias)
56
57 def extra_repr(self):
~/anaconda3/envs/aims-ml/lib/python3.6/site-packages/torch/nn/functional.py in linear(input, weight, bias)
1024 return torch.addmm(bias, input, weight.t())
1025
-> 1026 output = input.matmul(weight.t())
1027 if bias is not None:
1028 output += bias
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'mat2'
I installed the package dependencies using the environment.yml
file so the dependencies in my conda environment are the same as listed there.
I was able to fix this issue by explicitly specifying whether to move X
and Y
into the GPU or the CPU. If this isn't isolated to my setup alone, I'd be happy to refactor all of the notebooks to make sure they all work on the CPU and GPU as expected and submit a PR.
There seems to be an issue for jekyllbook folder under docs, as jekyll cannot be properly ran per instructions. Our team fixed it by separately cloning ebetica/jekyllbook and move relevant files under docs/jekyllbook folder.
Bugs found in #35.
Do not use e^
but \exp()
.
Add background colour to the sigmoid.
Use \left(
and \right)
when the argument is "tall" (see log of a logistic sigmoid).
Some titles do not have timestamps.
The norm uses \Vert
while the absolute value uses \vert
. Don't use ||
and |
.
It looks like the Field class has default UNK and PAD token in the init.
here is part of build_vocab that has the specails and its return statement:
specials = list(OrderedDict.fromkeys(
tok for tok in [self.unk_token, self.pad_token, self.init_token,
self.eos_token]
if tok is not None))
self.vocab = self.vocab_cls(counter, specials=specials, **kwargs)
Hi,
I was watching the recording of the lecture and you mentioned that you can stack the encoder layers.
I was looking at the forward pass of the Encoder class, and it seems to overwrite x in each part of the for loop, so it seems to me that it only returns the final layer's encoding of the embedding.
Am I missing something? It doesn't seem that the previous EncoderLayer's encodings are being used. I can submit a PR with my understanding of the fix if this is an actually an issue.
When I tried to translate 10-1.md, I found that some markdown comment is included in the contents
Thus, getting annotated samples for categories towards the end of the tail requires huge quantities of data to be labelled [commenting out this redundant phrase]: <> (because of the nature of the distribution of categories).
I think it should be removed or modified.
How can I handle this?
Thanks in advance.
Since Arabic is a language where you write from right to left , we face problems with visualizing docs written in Arabic properly. The text at first would seem like a mess and the equations scatters in a strange way when rendering the md files.
A way I found is to use the uni-code ‫ followed by semicolon in every paragraph and put the all equations in another curly braces but this may be impractical.
an example for this:
هذه الجملة تبدا من اليمين
But if there is a better and more practical way to do this please suggest it to us.
In the notes for week 5 lab,
the 2nd paragraph says: "Instead of using the matrix A above, we will change the matrix width to the kernel size k."
There is no matrix A mentioned above the paragraph.
I think it refering to the notes of a previous session.
Energy-based models that have a regulariser, which is additive to your energy function, are completely equivalent to Bayesian models where the likelihood is exponential of the energy, and now you get exp(energy) exp(regularizer),
-for the word "regulariser", is this a typo? I see regulariser and regularizer.
In the English lecture note 14-2.md, line 55
A: Hinge is better than NLL becuase **hinge** will try to push the difference between the correct answer and other answers to infinity, whereas hinge only wants to make it larger than some value (the margin m).
supposed to be changed into
A: Hinge is better than NLL becuase **NLL** will try to push the difference between the correct answer and other answers to infinity, whereas hinge only wants to make it larger than some value (the margin m).
Hi @Atcold In my last PR I have organized week06 files in one folder! So.. please if you can delete 06.md^&^06-1.md from docs/ar , delete them please! Cuz there are already in week06 folder !
https://atcold.github.io/pytorch-Deep-Learning/en/week05/05-3/.
m here refers to the number of components in the output vector. (In the earlier lectures m referred to number of examples in the training set).
k refers to the number of components in vector of weights. The components of the vector of weights are the same in each row of the matrix, but they are different for stacked matrices. [(a11,a12,a13,0,0,0,0,...),(0,a11,a12,a13,0,0,0,0,....),....]. For each of the m stacked matrices, we will have a unique vector (each vector is of length k).
From the passage -
1D convolution
We have 1 dimensional convolution going from 2 channels (stereophonic signal) to 16 channels (16 kernels) with kernel size of 3 and stride of 1. We then have 16 kernels with thickness 2 and length 3. Let’s assume that the input signal has a batch of size 1(one signal), 2 channels and 64 samples. The resulting output layer has 1 signal, 16 channels and the length of the signal is 62 (=64−3+1). Also, if we output the bias size, we’ll find the bias size is 16, since we have one bias per weight.
conv = nn.Conv1d(2, 16, 3) # 1 Dimension 2 channels (stereo signal), 16 kernels of size 3
conv.weight.size() # output: torch.Size([16, 2, 3]) . So the local receptive field is of size 3*2=6 different weights. These 6 weights are carried forward throughout the whole input signal. Then for each kernel which have a new set of 6 different weights to detect a new feature.
conv.bias.size() # output: torch.Size([16])
x = torch.rand(1, 2, 64) # batch of size 1, 2 channels, 64 samples
conv(x).size() # output: torch.Size([1, 16, 62]) . So 16 different vectors, each of size 62.
conv = nn.Conv1d(2, 16, 5) # 2 channels, 16 kernels of size 5
conv(x).size() # output: torch.Size([1, 16, 60])
2D convolution
We first define the input data as 1 sample, 20 channels (say, we’re using an hyperspectral image) with height 64 and width 128. The 2D convolution has 20 channels from input and 16 kernels with size of 3*5. After the convolution, the output data has 1 sample, 16 channels with height 62 (=64−3+1) and width 124(=128−5+1).
x = torch.rand(1, 20, 64, 128) # 1 sample, 20 channels, height 64, and width 128
conv = nn.Conv2d(20, 16, (3, 5)) # 20 channels, 16 kernels, kernel size is 3 x 5
conv.weight.size() # output: torch.Size([16, 20, 3, 5])
conv(x).size() # output: torch.Size([1, 16, 62, 124])
How do you map 20 input channels to 16 output kernels?
Bugs found in #36.
All titles need to link to the correct timestamp in the video.
Replace the PyTorch implementation image with actual code (and fix the bug I've pointed out in class).
The *
or \ast
is used for convolutions, not multiplication. If needed, use \cdot
.
The d
is the differential. Use \mathrm{d}
instead.
While reading the notes, I found that the website is not displaying latex equations present in part 5.2 - Optimization Techniques II. The md file for this part does contain the required latex but it is somehow just not rendering on the website.
the title (Batch-Ification in Language Modeling) is missing in (06-3.md)
Given that all the scribes contributed to this website, should we maybe have a "contributors" page? I imagine even just linking their NYU emails would be fine.
Hi @Atcold,
I just noticed that in week 7, section 2 (SSL, EBM with details and examples) the questions also got included when the notes got posted:
https://atcold.github.io/pytorch-Deep-Learning/en/week07/07-2/
These are right at the bottom of the page.I am not sure if this was intentional to leave them in as this is not the case in any other section. These refer to the three questions and answers we are asked to provide along with our weekly notes. I apologize for this confusion, but I had left this in as a comment along with my notes, but perhaps these should not be here.
Best,
Syed
Where are these coming from, @ebetica? Can we avoid the repetition and leave there just the capital instance? Also, where is the Korean edition getting the DL from? I didn't input that anywhere, I think.
Does it mean C(G(z)) goes to m or 0, or this is just an error?
Another one:
I think it means "pass the point" rather than "past the point".
This poses a problem for convergence of the GAN: the discriminator feedback gets less meaningful over time. If the GAN continues training past the point when the discriminator is giving completely random feedback, then the generator starts to train on junk feedback and its quality may collapse. [Refer to training convergence in GANs]
Another one:
Week 7 part2:
As z over a set, y varies over the manifold of possible predictions.
Should it be:
As z varies over a set, y varies over the manifold of possible predictions.?
Farsi should default to RTL.
@ebetica can you please take care of this?
same issue in [FR] version. the title (Batch-Ification in Language Modeling) is missing in (06-3.md)
In model distillation we take the pre-trained network and use the labels the network predicted in a softer fashion to generate labels for our images.
It is not just the comma. I don't really understand: use the labels the network
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.