Code Monkey home page Code Monkey logo

nyu-dlsp20's People

Contributors

asvyatkovskiy avatar atcold avatar bofei5675 avatar deeesp avatar ebetica avatar emirceyani avatar fguiso avatar goodboychan avatar guidopetri avatar jiqihumanr avatar johnsonnguyen1820 avatar jonathansum avatar lbourdois avatar lecjacks avatar marcozullich avatar marofmar avatar melikenurm avatar mrinaljain17 avatar nhuang37 avatar ritchieng avatar seungheondoh avatar seungjaeryanlee avatar shc443 avatar skyil7 avatar t46 avatar tangshengku avatar titusjgr avatar utph avatar wwengm avatar xingdi-eric-yuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nyu-dlsp20's Issues

08-2.md: wrong image references in text

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.

[AR] Arabic Translation Contribution.

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.

Missing captions on last two figures of 10-3

On 10-3.md the last two figures are missing captions:

  • would-be Fig. 6 (in section "Detailed Model Structure") has the caption superimposed on the image file, but this causes issues in the translated versions since there's only an English sentence which might not be intelligible for the foreign readers
  • would-be Fig. 7 (in section "Examples of Movement"), which is a composition of 4 sub-images, has no caption at all: although the caption is inferrable from the text above, this doesn't seem to fit with the style of the project: as far as I've seen, all figures are numbered and have a caption, even when this is trivially obtainable from the text.

Broken image links in 3.3. Properties of natural signals

The following image links are broken:

  • Figure 2(a)
  • Figure 2(b)
  • Figure 3(a)
  • Figure 3(b)

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

02 space stretching linear transformation should it be Y=X@W instead of [email protected]()?

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)

Figure Number Issue in 14-1.md

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:

  1. Remove figure name part in the figure picture itself or
  2. Change figure name in the explanation

<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)

[EN] content issue in 14-3.md

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.

[EN] Possible missing image on Week 6 - Part 3

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

TypeError in plot_

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)

Week 2 - Lab bugs

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.

[All Langs] ALL links broken on index.md

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.

Video recordings

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.

GPU tensors being passed when CPU tensors are expected

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.

Jekyll setup issue

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.

Week 2 - Part 2 bugs

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 |.

15-transformer. build_vocab function does not take the argument "specials"

image
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)

15-Transformer Notebook: Encoder Class Possibly Using Only Last Layer

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.

Including markdown comment in 10-1.md

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.

[AR] A proper way to visualize Arabic pages

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 &#x202b followed by semicolon in every paragraph and put the all equations in another curly braces but this may be impractical.
an example for this:
‫ هذه الجملة تبدا من اليمين ${x = y}$ مرورا بالمعادلة و تنتهي باليسار

But if there is a better and more practical way to do this please suggest it to us.

Week 5: Lab

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.

Possible English error?

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.

image

Latex issue

I have said this on Stack, but I deleted it and post it here because I guess I should post it here.

Latex issue:
image

And the Chinese version also has this problem too.
I don't know how to fix the Chinese version since the English version has this issue too.
image
Feel free to close it is a known issue.
Other:
image

[Content] lecture note 14-2.md

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).

[AR] issue in docs/ar

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 !
20200917_121413.jpg

Notation Issues in Week 5 Practicals Part 1

https://atcold.github.io/pytorch-Deep-Learning/en/week05/05-3/.
image
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?

Week 2 - Part 1 bugs

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.

LaTeX equations not showing on website (Week 5 part 2)

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.

Contributors page?

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.

Duplicate image on 10-2.md

On 10-2.md figures 4 and 5 are the same: namely, fig. 4 (predict step of ClusterFit) is repeated also in place of fig. 5, which should depict "Standard" pretrain + transfer vs. "Standard" pretrain + ClusterFit.
immagine

Week 7 SSL, EBM with details and examples contains the 3 questions

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

Weird tab name

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.

Screenshot 2020-03-23 01 56 28

Screenshot 2020-03-23 02 14 34

Screenshot 2020-03-23 01 56 53

Possible Week09 Part3 Error in math notation and english spelling

image
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.?

[EN] Possible Grammar Error or the Sentense has Error

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

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.