Skip to content
Snippets Groups Projects
Commit f6dfd54e authored by Quentin Gallouédec's avatar Quentin Gallouédec
Browse files

note about memory

parent b595e37e
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ Your code must be properly documented. It must follow the [PEP257 recommendation ...@@ -38,7 +38,7 @@ Your code must be properly documented. It must follow the [PEP257 recommendation
```bash ```bash
git clone https://gitlab.ec-lyon.fr/<user>/image-classification git clone https://gitlab.ec-lyon.fr/<user>/image-classification
``` ```
4. In this tutorial you will use files that should not be pushed to the remote repository. To ignore them when committing, you can put their path in a file named `.gitignore`. For simplicity, we use the [`.gitignore` file](https://github.com/github/gitignore/blob/main/Python.gitignore) recommended by GitHub for python projects. 4. In this tutorial you will use files that should not be pushed to the remote repository. To ignore them when committing, you can put their path in a file named `.gitignore`. For simplicity, we use the [`.gitignore` file](https://github.com/github/gitignore/blob/main/Python.gitignore) recommended by GitHub for Python projects.
## Prepare the CIFAR dataset ## Prepare the CIFAR dataset
...@@ -73,8 +73,8 @@ This database can be obtained at the address https://www.cs.toronto.edu/~kriz/ci ...@@ -73,8 +73,8 @@ This database can be obtained at the address https://www.cs.toronto.edu/~kriz/ci
- `labels_train` the training labels, and - `labels_train` the training labels, and
- `k` the number of of neighbors. - `k` the number of of neighbors.
This function must return the predicted labels for the elements of `data_train`. This function must return the predicted labels for the elements of `data_train`.
**Note:** if the memory occupation is too important, you can use several batches for the calculation of the distance matrix (loop on sub-batches of test data). **Note:** if the memory occupation is too important, you can use several batches for the calculation of the distance matrix (loop on sub-batches of test data).
{: .note}
3. Write the function `evaluate_knn` taking as parameters: 3. Write the function `evaluate_knn` taking as parameters:
- `data_train` the training data, - `data_train` the training data,
- `labels_train` the corresponding labels, - `labels_train` the corresponding labels,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment