A machine learning experiment
Keras implementation of Hinton’s knowledge distillation (KD), a way of transferring knowledge from a large model into a smaller model.
model | accuracy, % | top 5 accuracy, % | logloss |
---|---|---|---|
Xception | 82.3 | 94.7 | 0.705 |
MobileNet-0.25 | 64.6 | 85.9 | 1.455 |
MobileNet-0.25 with KD | 66.2 | 86.7 | 1.464 |
SqueezeNet v1.1 | 67.2 | 86.5 | 1.555 |
SqueezeNet v1.1 with KD | 68.9 | 87.4 | 1.297 |
flow_from_directory
I use three slightly different versions of Keras’ ImageDataGenerator.flow_from_directory
:
DirectoryIterator.next
also outputs image names.DirectoryIterator.next
packs logits with hard true targets.DirectoryIterator.next
function.[1] Geoffrey Hinton, Oriol Vinyals, Jeff Dean, Distilling the Knowledge in a Neural Network