update cw2

This commit is contained in:
tpmmthomas 2024-11-11 22:33:32 +08:00
parent 98e232af70
commit 26364ec94e
14 changed files with 31 additions and 15 deletions

21
.gitignore vendored
View File

@ -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

View File

@ -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.

Binary file not shown.

1
install.sh Normal file
View File

@ -0,0 +1 @@
conda install tqdm

View File

@ -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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
run_vgg_08_default.sh Normal file
View File

@ -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

1
run_vgg_38_default.sh Normal file
View File

@ -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

View File

@ -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

View File

@ -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']
)