This repository is the official implementation of PLS


1. Requirements
Please install a virtual environment

	$ conda create -n pls python=3.8 anaconda

Activate the environment

	$ conda activate pls

Please install the following packages in the environment

	$ conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch
	$ pip install ftfy

2. Training
	For PLS, please use --model batch_pca inside .sh file. For iPLS, use --model maha_ipca inside .sh file

	Run the following script 
	
	$ bash run_DATASET.sh

	where DATASET needs to be replaced by one of [cifar10, cifar100_10t, cifar100_20t, imgnet]. e.g. run_cifar10.sh

3. Acknowledgement
The code format follows DER++
https://github.com/aimagelab/mammoth

