|
| 1 | +# Tutorial on basic neural network concepts |
| 2 | + |
| 3 | +<!-- [](https://zenodo.org/doi/10.5281/zenodo.10792272) |
| 4 | +[](https://www.gnu.org/licenses/gpl-3.0) --> |
| 5 | + |
| 6 | +- [Download the repository](#download-the-repository) |
| 7 | +- [Getting started](#getting-started) |
| 8 | +- [Running the tutorial](#running-the-tutorial) |
| 9 | + |
| 10 | +## Material for this tutorial |
| 11 | + |
| 12 | +- The theoretical lecture can be found here: |
| 13 | + <!-- - [Part 1: Introduction to reinforcement learning](https://github.com/machine-learning-tutorial/neural-networks/blob/main/slides/nns-part1.pdf) --> |
| 14 | + |
| 15 | +- The tutorial in slide form is here |
| 16 | + <!-- - [Part 1: simple gridworld (no ML libraries)](https://machine-learning-tutorial.github.io/neural-networks/1-neural-networks.html#/) --> |
| 17 | + |
| 18 | +## Download the repository |
| 19 | + |
| 20 | +### Get the repository with Git |
| 21 | + |
| 22 | +You will need to have Git previously installed in your computer. |
| 23 | +To check if you have it installed, open your terminal and type: |
| 24 | + |
| 25 | +``` bash |
| 26 | +git --version |
| 27 | +``` |
| 28 | + |
| 29 | +#### Git installation in MacOS |
| 30 | + |
| 31 | +``` bash |
| 32 | +brew update |
| 33 | +brew install git |
| 34 | +``` |
| 35 | + |
| 36 | +#### Git installation in Linux |
| 37 | + |
| 38 | +In Ubuntu/Debian |
| 39 | + |
| 40 | +``` bash |
| 41 | +sudo apt install git |
| 42 | +``` |
| 43 | + |
| 44 | +In CentOS |
| 45 | + |
| 46 | +``` bash |
| 47 | +sudo yum install git |
| 48 | +``` |
| 49 | + |
| 50 | +Once you have Git installed open your terminal, go to your desired directory, and type: |
| 51 | + |
| 52 | +``` bash |
| 53 | +git clone https://github.com/machine-learning-tutorial/reinforcement-learning |
| 54 | +cd reinforcement-learning |
| 55 | +``` |
| 56 | + |
| 57 | +## Getting started |
| 58 | + |
| 59 | +You need to install the dependencies before running the notebooks. |
| 60 | + |
| 61 | +### Using conda |
| 62 | + |
| 63 | +If you don't have conda installed already and want to use conda for environment management, you can install the miniconda as [described here](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html). |
| 64 | + |
| 65 | +- Create a conda env with `conda create -n rl-tutorial python=3.10` |
| 66 | +- Activate the environment with `conda activate rl-tutorial` |
| 67 | +- Install the required packages via `pip install -r requirements.txt`. |
| 68 | +- Run the following commands: |
| 69 | + |
| 70 | +```bash |
| 71 | +python -m jupyter contrib nbextension install --user |
| 72 | +python -m jupyter nbextension enable varInspector/main |
| 73 | +``` |
| 74 | + |
| 75 | +- **After the tutorial** you can remove your environment with `conda remove -n nn-tutorial --all` |
| 76 | + |
| 77 | + |
| 78 | +## Running the tutorial |
| 79 | + |
| 80 | +After installing the package |
| 81 | + |
| 82 | +You can start the jupyter notebook in the terminal, and it will start a browser automatically |
| 83 | + |
| 84 | +```bash |
| 85 | +python -m jupyter notebook |
| 86 | +``` |
| 87 | + |
| 88 | +Alternatively, you can use supported Editor to run the jupyter notebooks, e.g. with VS Code. |
| 89 | + |
| 90 | +### Jupyter Notebooks |
| 91 | + |
| 92 | +Use `cmd+Enter` to execute one cell block |
| 93 | + |
| 94 | +### Part 1 Simple Gridworld (no ML libraries) |
| 95 | + |
| 96 | +The first part of the tutorial is in `RL_simple_gridworld.ipynb`. |
| 97 | + |
| 98 | +## Citing the tutorial |
| 99 | + |
| 100 | +This tutorial is registered [Zenodo](https://zenodo.org/). |
| 101 | +Please use this DOI when citing this code: |
| 102 | + |
| 103 | +<!-- ```bibtex |
| 104 | +@software{santamaria_garcia_2024_10792273, |
| 105 | + author = {Santamaria Garcia, Andrea and |
| 106 | + Xu, Chenran}, |
| 107 | + title = {Tutorial on basic neural network concepts}, |
| 108 | + month = 03, |
| 109 | + year = 2024, |
| 110 | + publisher = {Zenodo}, |
| 111 | + version = {v1.0.1}, |
| 112 | + doi = {10.5281/zenodo.10792273}, |
| 113 | + url = {https://doi.org/10.5281/zenodo.10792273} |
| 114 | +} |
| 115 | +``` --> |
| 116 | + |
| 117 | +## Disclaimer |
| 118 | + |
| 119 | +The content of this repository was developed by the [AI4Accelerators team](https://www.ibpt.kit.edu/AI4Accelerators.php) at the [Institute of Beam Physics and Technology (IBPT)](https://www.ibpt.kit.edu/), [Karlsruhe Institute of Technology](https://www.kit.edu/english/). |
0 commit comments