-
The theoretical lecture can be found here:
-
The tutorial in slide form is here
You will need to have Git previously installed in your computer. To check if you have it installed, open your terminal and type:
git --versionbrew update
brew install gitIn Ubuntu/Debian
sudo apt install gitIn CentOS
sudo yum install gitOnce you have Git installed open your terminal, go to your desired directory, and type:
git clone https://github.com/machine-learning-tutorial/neural-networks
cd neural-networksOpen your terminal, go to your desired directory, and type:
wget https://github.com/machine-learning-tutorial/neural_networks/archive/refs/heads/main.zip
unzip main.zip
cd neural-networksYou need to install the dependencies before running the notebooks.
If you don't have conda installed already and want to use conda for environment management, you can install the miniconda as described here.
- Create a conda env with
conda create -n nn-tutorial python=3.10 - Activate the environment with
conda activate nn-tutorial - Install the required packages via
pip install -r requirements.txt. - Run the following commands:
python -m jupyter contrib nbextension install --user
python -m jupyter nbextension enable varInspector/main- After the tutorial you can remove your environment with
conda remove -n nn-tutorial --all
If you do not have conda installed:
Alternatively, you can create the virtual env with venv in the standard library
python -m venv nn-tutorialand activate the env with $ source /bin/activate (bash) or C:> /Scripts/activate.bat (Windows)
Then, install the packages with pip within the activated environment
python -m pip install -r requirements.txt
python -m jupyter contrib nbextension install --user
python -m jupyter nbextension enable varInspector/mainAfterwards, you should be able to run the provided notebooks.
After installing the package
You can start the jupyter notebook in the terminal, and it will start a browser automatically
python -m jupyter notebookAlternatively, you can use supported Editor to run the jupyter notebooks, e.g. with VS Code.
Use cmd+Enter to execute one cell block
The first part of the tutorial is in 1-neural_networks.ipynb.
The second part of the tutorial is in 2-mnist_training.ipynb
This tutorial is registered Zenodo. Please use this DOI when citing this code:
@software{santamaria_garcia_2024_10792273,
author = {Santamaria Garcia, Andrea and
Xu, Chenran},
title = {Tutorial on basic neural network concepts},
month = 03,
year = 2024,
publisher = {Zenodo},
version = {v1.0.1},
doi = {10.5281/zenodo.10792273},
url = {https://doi.org/10.5281/zenodo.10792273}
}The content of this repository was developed by the AI4Accelerators team at the Institute of Beam Physics and Technology (IBPT), Karlsruhe Institute of Technology.