Skip to content

J-Dymond/distribution-aware-exiting

Repository files navigation

Exploiting Epistemic Uncertainty at Inference Time

This repository contains the code used for the Paper titled Exploiting epistemic uncertainty at inference time for early-exit power saving.

It also contains some of the code used in the paper Adapting Branched Networks to Enable Progressive Intelligence, namely in the folder main/models.

The repository is organised as such:

  • main
    • sub directories:
      • models/:
        • code for producing ResNet models of any depth/width, and attaching any number of branches to them. There is also code for producing 'slimmable' models, with 3 operating widths at inference time.
      • notebooks/:
        • Analysis notebooks
      • utils/:
        • Utility files for calling models, dataset, etc.
      • ptflops/:
        • Adapted code from this repository used for calculating model parameter counts and MAC usage.
    • scripts:
      • train.py
        • Code for training the branched models
      • slimmable_train.py
        • Code for training 'slimmable' branched models
      • get_embeddings.py
        • Code for retrieving the embeddings on the train/validation set
      • knn_OOD.py
        • This performs the knn measurements using the OOD test sets
      • get_predictions.py
        • This performs the inference on the test set, to obtain the accuracy on each ID set, it also saves the raw outputs
  • bash-scripts
    • This contains bash scripts for running experiments using SLURM workload manager
    • These can be called to run the experiments of the paper
  • trained-models
    • Trained models are stored here, along with any of their evaluation results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published