-
Training and FLOP analysis - get the data for model accuracy, power draw from power monitor readings and FLOPs. Linear regression is performed to get the relation between FLOPs and energy use.
Code for training in https://github.com/MScDisseration/model_hub/tree/master/Training
Code for FLOPs in https://github.com/MScDisseration/model_hub/blob/master/models.py -
Vision models inference analysis - similar to previous notebook. Data is collected for power draw during inference (10000 inference run for each model).
Code for running inference in https://github.com/MScDisseration/model_hub/tree/master/Inference
pip install -r requirements.txt
https://pytorch.org/docs/master/torchvision/models.html#classification
python models.py
Using https://github.com/Lyken17/pytorch-OpCounter
Download folder of images to train on
curl https://download.pytorch.org/tutorial/hymenoptera_data.zip --output /media/data/hymenoptera_data.zip
Train models
cd Training
python finetune_multiple.py
cd Inference
python multipleRuns.py
cd Inference
python vision.py --path imagepath --model modelname
E.g. python vision.py --path "../data/butterfly.jpg" --model "alexnet"