Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor adjustments to the documentation #156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ML/Pytorch/Basics/pytorch_simple_fullynet.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down