From 4aed4749da7b01f163724ea7f908df8b06a1963d Mon Sep 17 00:00:00 2001 From: Matt Archer Date: Fri, 5 Jul 2024 09:38:23 +0100 Subject: [PATCH] improve task 2 text --- exercises/01_penguin_classification.ipynb | 2 +- worked-solutions/01_penguin_classification_solutions.ipynb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/exercises/01_penguin_classification.ipynb b/exercises/01_penguin_classification.ipynb index 5adb10c..ea9f855 100644 --- a/exercises/01_penguin_classification.ipynb +++ b/exercises/01_penguin_classification.ipynb @@ -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", diff --git a/worked-solutions/01_penguin_classification_solutions.ipynb b/worked-solutions/01_penguin_classification_solutions.ipynb index 50fc762..17735f2 100644 --- a/worked-solutions/01_penguin_classification_solutions.ipynb +++ b/worked-solutions/01_penguin_classification_solutions.ipynb @@ -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",