Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Adding Early Exit branch

Neta Zmora edited this page Apr 12, 2020 · 2 revisions

Using the Early-Exit method requires attaching exit branches to an exiting models. This can be done by making static changes to the PyTorch model code, or by dynamically adding the branches at runtime.

In Distiller, distiller.EarlyExitMgr is a utility class that helps us make dynamic changes to the model, in order to attach exit branches. The EE implementation for the CIFAR10 ResNet architecture resnet_cifar_earlyexit.py is a good example of how this is done in Distiller.