From f3f72bce44c4a78592d40e506ec367ba841db85a Mon Sep 17 00:00:00 2001 From: asytuyf <75701022+asytuyf@users.noreply.github.com> Date: Sun, 2 Jul 2023 20:45:03 +0200 Subject: [PATCH] Minor adjustments to the documentation 1 - Clearer description of the problem being solved 2 - how to install tqdm as it is not a native library in python --- ML/Pytorch/Basics/pytorch_simple_fullynet.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ML/Pytorch/Basics/pytorch_simple_fullynet.py b/ML/Pytorch/Basics/pytorch_simple_fullynet.py index 36a399d8..4a34cb75 100644 --- a/ML/Pytorch/Basics/pytorch_simple_fullynet.py +++ b/ML/Pytorch/Basics/pytorch_simple_fullynet.py @@ -1,8 +1,9 @@ """ A simple walkthrough of how to code a fully connected neural network -using the PyTorch library. For demonstration we train it on the very -common MNIST dataset of handwritten digits. In this code we go through -how to create the network as well as initialize a loss function, optimizer, +using the PyTorch library. This code is designed to solve a classic problem in machine learning: recognizing handwritten digits. +We use the MNIST dataset, which contains images of handwritten digits from 0 to 9. +The goal is to train a neural network to recognize these digits with high accuracy. +In this code we go through how to create the network as well as initialize a loss function, optimizer, check accuracy and more. Programmed by Aladdin Persson @@ -22,7 +23,7 @@ from torch.utils.data import ( DataLoader, ) # Gives easier dataset managment by creating mini batches etc. -from tqdm import tqdm # For nice progress bar! +from tqdm import tqdm # For nice progress bar! (Type "pip install tqdm" in your Terminal if u don't have the module to install it) # Here we create our simple neural network. For more details here we are subclassing and # inheriting from nn.Module, this is the most general way to create your networks and