diff --git a/.gitignore b/.gitignore index 641a040..94ca0e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ - #dropbox stuff *.dropbox* +.idea/* # Byte-compiled / optimized / DLL files __pycache__/ @@ -26,7 +26,7 @@ var/ *.egg-info/ .installed.cfg *.egg -etc/ +*.tar.gz # PyInstaller # Usually these files are written by a python script from a template @@ -64,14 +64,23 @@ target/ # Pycharm .idea/* -# Notebook stuff +#Notebook stuff notebooks/.ipynb_checkpoints/ -# Data folder +#Google Cloud stuff +/google-cloud-sdk +.ipynb_checkpoints/ +data/cifar-100-python/ +data/MNIST/ solutions/ - -# Latex stuff report/mlp-cw1-template.aux report/mlp-cw1-template.out report/mlp-cw1-template.pdf report/mlp-cw1-template.synctex.gz +.DS_Store +report/mlp-cw2-template.aux +report/mlp-cw2-template.out +report/mlp-cw2-template.pdf +report/mlp-cw2-template.synctex.gz +report/mlp-cw2-template.bbl +report/mlp-cw2-template.blg diff --git a/README.md b/README.md index 2afc450..8870d14 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Machine Learning Practical -This repository contains the code for the University of Edinburgh [School of Informatics](http://www.inf.ed.ac.uk) course [Machine Learning Practical](http://www.inf.ed.ac.uk/teaching/courses/mlp/). +This repository contains the code for the University of Edinburgh [School of Informatics](http://www.inf.ed.ac.uk) course Machine Learning Practical. This assignment-based course is focused on the implementation and evaluation of machine learning systems. Students who do this course will have experience in the design, implementation, training, and evaluation of machine learning systems. @@ -9,7 +9,11 @@ The code in this repository is split into: * a Python package `mlp`, a [NumPy](http://www.numpy.org/) based neural network package designed specifically for the course that students will implement parts of and extend during the course labs and assignments, * a series of [Jupyter](http://jupyter.org/) notebooks in the `notebooks` directory containing explanatory material and coding exercises to be completed during the course labs. -## Coursework 2 -This branch contains the python code and latex files of the first coursework. The code follows the same structure as the labs, in particular the mlp package, and a specific notebook is provided to help you run experiments. - * Detailed instructions are given in MLP2024_25_CW2_Spec.pdf (see Learn, Assessment, CW2). - * The [report directory](https://github.com/VICO-UoE/mlpractical/tree/mlp2024-25/coursework2/report) contains the latex files that you will use to create your report. +## Remote working + +If you are working remotely, follow this [guide](notes/remote-working-guide.md). + +## Getting set up + +Detailed instructions for setting up a development environment for the course are given in [this file](notes/environment-set-up.md). Students doing the course will spend part of the first lab getting their own environment set up. + diff --git a/data/regularization_debug_pack.npy b/data/regularization_debug_pack.npy deleted file mode 100644 index f7c7494..0000000 Binary files a/data/regularization_debug_pack.npy and /dev/null differ diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..7cadb2c --- /dev/null +++ b/install.sh @@ -0,0 +1 @@ +conda install tqdm \ No newline at end of file diff --git a/mlp/errors.py b/mlp/errors.py index c05b752..3f0ae4f 100644 --- a/mlp/errors.py +++ b/mlp/errors.py @@ -57,7 +57,7 @@ class BinaryCrossEntropyError(object): Scalar error function value. """ return -np.mean( - targets * np.log(outputs) + (1. - targets) * np.log(1. - outputs)) + targets * np.log(outputs) + (1. - targets) * np.log(1. - ouputs)) def grad(self, outputs, targets): """Calculates gradient of error function with respect to outputs. diff --git a/notes/figures/._putty1.png b/notes/figures/._putty1.png deleted file mode 100644 index 337b996..0000000 Binary files a/notes/figures/._putty1.png and /dev/null differ diff --git a/notes/figures/._putty2.png b/notes/figures/._putty2.png deleted file mode 100644 index e5b291d..0000000 Binary files a/notes/figures/._putty2.png and /dev/null differ diff --git a/notes/figures/._putty3.png b/notes/figures/._putty3.png deleted file mode 100644 index c49f99e..0000000 Binary files a/notes/figures/._putty3.png and /dev/null differ diff --git a/notes/figures/._putty4.png b/notes/figures/._putty4.png deleted file mode 100644 index 640e931..0000000 Binary files a/notes/figures/._putty4.png and /dev/null differ diff --git a/notes/figures/._putty5.png b/notes/figures/._putty5.png deleted file mode 100644 index 3e62342..0000000 Binary files a/notes/figures/._putty5.png and /dev/null differ diff --git a/run_vgg_08_default.sh b/run_vgg_08_default.sh new file mode 100644 index 0000000..3c6b1e5 --- /dev/null +++ b/run_vgg_08_default.sh @@ -0,0 +1 @@ +python pytorch_mlp_framework/train_evaluate_image_classification_system.py --batch_size 100 --seed 0 --num_filters 32 --num_stages 3 --num_blocks_per_stage 0 --experiment_name VGG_08_experiment --use_gpu True --num_classes 100 --block_type 'conv_block' --continue_from_epoch -1 diff --git a/run_vgg_38_default.sh b/run_vgg_38_default.sh new file mode 100644 index 0000000..97ac4fb --- /dev/null +++ b/run_vgg_38_default.sh @@ -0,0 +1 @@ +python pytorch_mlp_framework/train_evaluate_image_classification_system.py --batch_size 100 --seed 0 --num_filters 32 --num_stages 3 --num_blocks_per_stage 5 --experiment_name VGG_38_experiment --use_gpu True --num_classes 100 --block_type 'conv_block' --continue_from_epoch -1 diff --git a/scripts/secure-notebook-server.sh b/scripts/secure-notebook-server.sh index 8edc548..95f0547 100644 --- a/scripts/secure-notebook-server.sh +++ b/scripts/secure-notebook-server.sh @@ -23,7 +23,7 @@ fi # Get user to enter notebook server password echo "Getting notebook server password hash. Enter password when prompted ..." printf $SEPARATOR -HASH=$(python -c "from jupyter_server.auth import passwd; print(passwd());") +HASH=$(python -c "from notebook.auth import passwd; print(passwd());") printf $SEPARATOR echo "... got password hash." # Generate self-signed OpenSSL certificate and key file diff --git a/setup.py b/setup.py index 20f2abe..46266b1 100644 --- a/setup.py +++ b/setup.py @@ -6,8 +6,8 @@ setup( name = "mlp", author = "Pawel Swietojanski, Steve Renals, Matt Graham and Antreas Antoniou", description = ("Neural network framework for University of Edinburgh " - "School of Informatics Machine Learning Practical course."), - url = "https://github.com/VICO-UoE/mlpractical", + "School of Informatics Machine Learning Practical course."), + url = "https://github.com/CSTR-Edinburgh/mlpractical", packages=['mlp'] )