Imported from https://github.com/gpapamak/distilling_model_knowledge