(For ECS 271.) Let's compare the KL Divergence loss propounded by Xie et al. 2016 on to some alternatives, starting with features taken from a pre-trained image classifier instead of the SAE's used by Xie et al.
- Get pretrained Resnet-18
model = primary.net.new()
- Download STL-10 dataset
python data/stl10_input.py
- Partition dataset into train and test sets
python -m data.dataset
- Run trainer to fine-tune Resnet-18
NAME=my_session
python -m primary.train \
--save_path "saves/$NAME.pth" \
--log_path "logs/$NAME.log"
- Prepare dataset
python -m sae.dataset
- Pretrain SAE
NAME=sae-pretrain
rm "logs/$NAME.log"
python -m sae.pretrain \
--ep 5000 \
--lr 1e-1 \
--test_every 0 \
--print_every 0 \
--save_path "saves/$NAME.pth" \
--log_path "logs/$NAME.log"
- Fine-tune SAE's encoder
NAME=sae-finetune
python -m sae.finetune \
--ep 5000 \
--lr 1e-1 \
--test_every 0 \
--print_every 0 \
--load_path "saves/sae-pretrain.pth" \
--save_path "saves/$NAME.pth" \
--log_path "logs/$NAME.log"
- Subclass trainer to give a _loss function that doesn't use fine-tuning (KL Div loss) but instead performs reconstruction loss for SAE
- Add SAE net, trainer to project
- Extract HOG features
- Make dataset for SAE training
- Show ACC in trainer
- Hyperparam search
- Split dataset
- Write dataset module
- Write ACC computation
- Write trainer to fine tune resnet-18 feature extractor