PyTorch implementation of Alexnet with an early exit structure as defined by S. Teerapittayanon et al. Note that the implementation merely simulates early exiting; no quantification of time or energy savings can be made due to the nature of PyTorch.
Also note that this is a crude file still in the development phase. Some lines may have unclear intention and the code may also contain quirks.