You may find in this repository all the files that are necessary for completing the coursework:
Task.pdf
containing all the main coursework instructions and questions.starter_code.py
providing Python 3 code which you will build upon during this tutorial and the associated coursework.environment.py
in which the environment is implemented. This file should not be modified.torch_example.py
which gives an example of a supervised learning experiment in PyTorch (see section 2 inTutorial.pdf
for more information).
You need to use Python 3.6 or greater.
To install the libraries, start by cloning this repository and enter the created folder:
git clone https://github.com/alvaroprat97/RL.git
Virtual environment (called venv
here):
python3 -m venv ./venv
Enter the environment:
source venv/bin/activate
And install the libraries in the environment by launching the following command:
pip install -r requirements.txt
This will install the following libraries (and their dependencies) in the virtual environment venv
:
torch
opencv-python
numpy
matplotlib
Before launching your experiment, be sure to use the right virtual environment in your shell:
source venv/bin/activate # To launch in the project directory
Once you are in the right virtual environment, you can directly launch the scripts by using one of the following command:
python torch_example.py # To launch the pytorch example script
python starter_code.py # To launch the coursework script
It is also possible to use the virtual environment tools already included in IDEs (such as PyCharm).
If you want to leave the virtual environment, you just need to enter the following command:
deactivate