In this repository, we implemented metric learning for cifar-10 classification by using hydra+pytorch-lightning.
You can manage hyparams for deep learning thanks to hydra!
You need to change "data_dir", which is a directory for downloaded cifar-10 dataset, if this directory contains nothing, dataset will automatically be downloaded there.
Here, you can change dataset and data loader behaviour.
Normally, you don't need to change anything here.
lit_MetricTrainer is the most important part of the implementation as it defines each step of train,val, and test.
First, you need to create the virtural environment.
python -m venv pl-metric
And then, activate the virtural environment.
(for Windows)
./pl-metric/Scripts/activate
(for Mac or Linux)
source pl-metric/bin/activate
Second, you need to install libraries to execute the code.
pip -r install requirements.txt
Finally, you are ready to run the code!
python lit_main.py