GithubHelp home page GithubHelp logo

yandexdataschool / practical_dl Goto Github PK

View Code? Open in Web Editor NEW
1.5K 69.0 621.0 241.07 MB

DL course co-developed by YSDA, HSE and Skoltech

License: MIT License

Jupyter Notebook 97.89% Python 1.96% Dockerfile 0.01% C++ 0.02% Cuda 0.12%
deep-learning course course-materials theano lasagne

practical_dl's Issues

Is the formula correct in homework 1 ex 4 ?

There may be an error in ex 4's statement . I believe it should be ||X||_F^2 = tr(...) instead . You also use the Frobenius norm later in the second approach.

In exercise 4. you say:

image

The fact is not too obvious as the 2-norm is Jose Nocedal's Numerical Optimization book as:

image

I have found the following readings useful regarding this issue but was not clarified - the rabbit hole runs deep :

  • Pedersen and Pedersen - The Matrix Cookbook : (262) page 30
  • Stackoverflow and mathpages with proofs about the characteristic polynomial

Theano+Lasagne installation

Any issues concerning installation can just as well be sent here.

In this course, we'll use the following technology stack for deep learning

  • Theano (symbolic computation graphs)
  • Lasagne(neural networks)
  • Agentnet(deep reinforcement learning) - only if you decide to complete the deep reinforcement learning assignments.

A simple roadmap to installing them can be found here -

The frameworks can be easily installed on Mac OS and Linux. Windows installation is, a bit tougher, so if you don't feel like it, try using docker (e.g. kitematic gui or console on windows).

If you run into any trouble, feel free to post here, even if it's like "i don't know what the hell all these letters mean!!!".

week08:autoencoders_pytorch Pooling layers usage

MaxUnpool needs "indices" that are returned by MaxPool but the first is located in the decoder and the second is in the encoder thus all direct calls of starter code to encoder and decoder do not support the indices transportation from Pool to Unpool

Possible solutions:

  1. do not use direct calls for counting code/reconstruction
  2. request both code and reconstruction using one function call

Installing dependencies

You can discuss any issues concerning installation in this thread.

We assume that you have basic data science toolkit (sklearn, numpy/scipy/pandas). Basically whatever comes with default anaconda distribution.

Assignments require numpy, scipy, pandas, matplotlib, scikit-learn and sometimes tqdm to launch. Luckily, all those packages are either pre-installed or can be installed with pip install <name>.

You will also need to install PyTorch:

If you don't/can't install that (e.g. you use windows and installation is tricky), try Docker Container for CPU or nvidia-docker for GPU.

If you run into any trouble, feel free to post here, even if it's like "i don't know what the hell all these letters mean!!!".

Were the seminars recorded?

Would like to know whether the seminars (in Russian) were recorded for the 2019 course or will there be recordings of the seminars for the 2020 course?

week4: not valid "img" input for testing week

Original test line
assert embedding(torch.Tensor(img)).data.numpy().shape == (1, 2048), "your output for single image should have shape (1, 2048)"

After facing the same problems as below I decide to show the problem on default model for sure

Problem 1

---> 17 assert model(img).data.numpy().shape == (1, 2048), "your output for single image should have shape (1, 2048)"
 
/usr/local/lib/python3.6/dist-packages/torchvision/models/inception.py in forward(self, x)
     94     def forward(self, x):
     95         if self.transform_input:
---> 96             x_ch0 = torch.unsqueeze(x[:, 0], 1) * (0.229 / 0.5) + (0.485 - 0.5) / 0.5
     97             x_ch1 = torch.unsqueeze(x[:, 1], 1) * (0.224 / 0.5) + (0.456 - 0.5) / 0.5
     98             x_ch2 = torch.unsqueeze(x[:, 2], 1) * (0.225 / 0.5) + (0.406 - 0.5) / 0.5

TypeError: unsqueeze(): argument 'input' (position 1) must be Tensor, not numpy.ndarray

I fixed it using torch.Tensor(img), but ...

Problem 2

---> 17 assert model(torch.Tensor(img)).data.numpy().shape == (1, 2048), "your output for single image should have shape (1, 2048)"

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py in conv2d_forward(self, input, weight)
    338                             _pair(0), self.dilation, self.groups)
    339         return F.conv2d(input, weight, self.bias, self.stride,
--> 340                         self.padding, self.dilation, self.groups)
    341 
    342     def forward(self, input):

RuntimeError: Expected 4-dimensional input for 4-dimensional weight 32 3 3, but got 3-dimensional input of size [299, 3, 3] instead

week5: tsne usage for nlp

  1. tsne has not a "transform" functionality thus it can not be used for counting embedding of a new entry thus the query neighbors can not be found in embedded space (assume that the query is not in training data)
    (however, the task does not demand on using tsne, but it is not obvious)

  2. the seminar notebook encourage to use TSNE with verbose 100 or 1000, but the running time blow up from a few seconds to unknown (I lost my patience after 10 minutes). May be put some warning about it to students?

hw 0 - mark

Hi!

I sent my homework from [email protected] at 21.57 on Wensday, 28/09/2016. I sent another email (21/11/2016) when I didn't found myself in the grade sheet, but there was no answer. So I've posted an issue here.

Erorr in seminar01/backprop/adaptive_sgd

Some cells in seminar01/backprop/adaptive_sgd/adaptive_sgd.ipynb contains visualize(X[ind,:], y[ind], w, loss, n_iter) instead of visualize(X[ind,:], y[ind], w, loss). The first one should be replaced with the second one.

week4: Memory problem

Google Collab:

CPU

100-th iteration kills runtime with "unknown reason"

CUDA

 0%|          | 110/25000 [00:01<05:47, 71.73it/s]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-19-adef1f515998> in <module>()
     26 
     27         # use your embedding model to produce feature vector
---> 28         features = embedding(input_tensor) #<YOUR CODE>
     29 
     30         X.append(features)



3 frames

/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in _max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode, return_indices)
    485         stride = torch.jit.annotate(List[int], [])
    486     return torch.max_pool2d(
--> 487         input, kernel_size, stride, padding, dilation, ceil_mode)
    488 
    489 max_pool2d = boolean_dispatch(

RuntimeError: CUDA out of memory. Tried to allocate 28.00 MiB (GPU 0; 11.17 GiB total capacity; 10.70 GiB already allocated; 5.81 MiB free; 141.58 MiB cached)

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.