Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
0 results Searching
Select Git revision
Loading items
Show changes

Commits on Source 1

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline

Files

Original line number Diff line number Diff line
%% Cell type:markdown id:7edf7168 tags:

# TD2: Deep learning

%% Cell type:markdown id:fbb8c8df tags:

In this TD, you must modify this notebook to answer the questions. To do this,

1. Fork this repository
2. Clone your forked repository on your local computer
3. Answer the questions
4. Commit and push regularly

The last commit is due on Sunday, December 1, 11:59 PM. Later commits will not be taken into account.
The last commit is due on Wednesday, December 4, 11:59 PM. Later commits will not be taken into account.

%% Cell type:markdown id:3d167a29 tags:

Install and test PyTorch from  https://pytorch.org/get-started/locally.

%% Cell type:code id:330a42f5 tags:

``` python
%pip install torch torchvision
```

%% Cell type:markdown id:0882a636 tags:


To test run the following code

%% Cell type:code id:b1950f0a tags:

``` python
import torch

N, D = 14, 10
x = torch.randn(N, D).type(torch.FloatTensor)
print(x)

from torchvision import models

alexnet = models.alexnet()
print(alexnet)
```

%% Cell type:markdown id:23f266da tags:

## Exercise 1: CNN on CIFAR10

The goal is to apply a Convolutional Neural Net (CNN) model on the CIFAR10 image dataset and test the accuracy of the model on the basis of image classification. Compare the Accuracy VS the neural network implemented during TD1.

Have a look at the following documentation to be familiar with PyTorch.

https://pytorch.org/tutorials/beginner/pytorch_with_examples.html

https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html

%% Cell type:markdown id:4ba1c82d tags:

You can test if GPU is available on your machine and thus train on it to speed up the process

%% Cell type:code id:6e18f2fd tags:

``` python
import torch