This demonstration is based on the great tutorial by Adrian Tam PhD, in which he explains Step by Step how to develop an (Artificial) Neural Network with PyTorch. 🤖🧠🇦🇮👾
This demonstration is primarily focused on the usage of a machine that is using Windows as an OS.
To ease the entry and reduce difficulties with basics like the setup of a virtual environment for Python, this demonstration provides helpful batch files. Those batch files support the initial setup, the installation of packages, and the launch of the main process.
The main process consists of the following steps, which are provided by the tutorial:
- Load the Dataset
- Define the PyTorch Model
- Define a Loss Function and Optimizers
- Run a Training Loop
- Evaluate the Model
- Make Predictions
- An installation of Windows OS
- Windows 10 or greater
- An installation of Python
- Python 3.10 or greater
- An optional installation of Git
- Minimum available Disk space of 2 GB
- Recommended available Disk space of 6 GB
The initial setup, the installation of packages is heavily supported by the batch file setup_install_pytorch_at_example_on_windows.bat. To get this batch file and all other necessary data, the repository can be cloned by using Git or downloaded to the local machine of the user.
This guide will show different ways that can be used to retrieve the necessary data from GitHub.
The utilization of Git is the most comfortable way to transfer the data of the repository to the recommended default location.
- On a system using Windows, the following expression can be used to clone the repository
- Command Line Shell (CMD)
git clone https://github.com/RobertLicht/NN_PyTorch_AT_Example.git %PUBLIC%\NN_PyTorch_AT_Example
- Git Bash Shell
git clone https://github.com/RobertLicht/NN_PyTorch_AT_Example.git /c/Users/Public/NN_PyTorch_AT_Example
- Command Line Shell (CMD)
As an alternative to Git, the data of the repository can be downloaded as an archive (ZIP) to the local machine of the user.
- Use the URL to download the repository:
- Extract the downloaded archive into the recommended default location:
- Windows
%PUBLIC%\NN_PyTorch_AT_Example\
- Linux
/c/Users/Public/NN_PyTorch_AT_Example/
- Windows
It is possible to use only the batch file setup_install_pytorch_at_example_on_windows.bat to get all files from the repository and install the necessary packages.
- Navigate to the file inside the Repository NN_PyTorch_AT_Example
- Use the button with three dots ・・・ (more file actions) or use the keyboard shortcut ctrl + shift + s to download the raw content
- Save or move the downloaded batch file to the recommended default location:
- Windows
%PUBLIC%\NN_PyTorch_AT_Example\
- Linux
/c/Users/Public/NN_PyTorch_AT_Example/
- Windows
After the initial data is gathered and stored at the local machine the process to set up everything else can be launched.
- Navigate to the file setup_install_pytorch_at_example_on_windows.bat and execute the batch script with a double-click
- The batch script will handle all requirements that are necessary to set up the demo
- During the setup, the user will be prompted to decide how to proceed
- In most cases pressing ENTER or entering n will be suitable to follow the default configuration
After the setup has been completed successfully, the Demonstrator is ready for usage.
The startup is handled by the batch file start_nn_pytorch_at_example.bat, which should be available at the recommended default location.
- Navigate to the file start_nn_pytorch_at_example.bat and execute the batch script with a double-click
- During the startup, an additional Command Line Shell running nvitop will be launched
- The tool nvitop provides some insights, considering the usage of system resources
- After initializing of libraries and nvitop a Windows PowerShell instance will be launched
Use at your own discretion and risk. You will be solely responsible for any damage to your computer system or loss of data.