keras implementation of group normalization. https://arxiv.org/abs/1803.08494
Yuxin Wu and Kaiming He
This repository is still work in progress.
The functionality of Group Normalization has not been fully checked. The implementation could be wrong.
from GroupNormalization import GroupNormalization
# GroupNormalization(axis=-1, epsilon=1e-6, group=32, **kwargs)
G = 8
model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3), kernel_initializer='he_normal', input_shape=input_shape))
model.add(GroupNormalization(group=G))
model.add(Activation('relu'))
...
- Dataset: Fashion MNIST
- Architecture
- Batch size: 1
- Optimizer: Adam
- Learning rate: from 1e-3 with callback
ReduceLROnPlateau(monitor='val_loss', factor=0.2, patience=3, min_lr=1e-5)
- Epochs: 13
- Training loss
- Validation loss
- Training accuracy
- Validation accuracy
a. GroupNorm w/ optimizer AMSGrad, batch size = 1
- Training time: 3 hrs on Google Colab
b. GroupNorm w/ optimizer AMSGrad, batch size = 128, epochs = 39
- Training time: 17 mins on Google Colab
- Training loss
- Validation loss
- Training accuracy
- Validation accuracy
Code borrows from DingKe. Instance normalization implementation is from keras-contrib.