Skip to content

Commit

Permalink
improve task 2 text
Browse files Browse the repository at this point in the history
  • Loading branch information
ma595 committed Jul 5, 2024
1 parent 5e1d0bb commit 4aed474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion exercises/01_penguin_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"\n",
"The penguin data reading and processing can be encapsulated in a PyTorch dataset class.\n",
"\n",
"- Why is this helpful?\n",
"- Why is a class representation helpful?\n",
"\n",
"All PyTorch dataset objects are subclasses of the ``torch.utils.data.Dataset`` class. To make a custom dataset, create a class which inherits from the ``Dataset`` class, implement some methods (the Python magic (or dunder) methods ``__len__`` and ``__getitem__``) and supply some data.\n",
"\n",
Expand Down
5 changes: 2 additions & 3 deletions worked-solutions/01_penguin_classification_solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,14 @@
"\n",
"The penguin data reading and processing can be encapsulated in a PyTorch dataset class.\n",
"\n",
"- Why is this class representation helpful?\n",
"- Why is a class representation helpful?\n",
" - Modularity - Separation of concerns makes the cde easier to understand, maintain and test.\n",
" - Maintainability - Changes are localised, therefore we only need to change a single file to update. \n",
" - Abstraction - Users do not need to know how the data is read or processed, they only need to know how to interact with the class. \n",
"\n",
"\n",
"All PyTorch dataset objects are subclasses of the ``torch.utils.data.Dataset`` class. To make a custom dataset, create a class which inherits from the ``Dataset`` class, implement some methods (the Python magic (or dunder) methods ``__len__`` and ``__getitem__``) and supply some data.\n",
"\n",
"Spoiler alert: we've done this for you already in ``src/ml_workshop/_penguins.py``.\n",
"Spoiler alert: we've done this for you already below (see ``src/ml_workshop/_penguins.py`` for a more sophisticated implementation)\n",
"\n",
"- Open the file ``src/ml_workshop/_penguins.py``.\n",
"- Let's examine, and discuss, each of the methods together.\n",
Expand Down

0 comments on commit 4aed474

Please sign in to comment.