Since the depthwise convnet is highlighted in the book several times and seems promising. I tried to replace all the Conv2D with SeperableConv2D in the code of 5.2 - Using convnets with small datasets. I ran all the programs on colaboratory.
First, I didn't change the model structure, in which data augumentation was adopted.
The accuracy of original Conv2d is around 84% after training for 100 epochs.
The accuracy of SeperableConv2D is around 73% after training for 100 epochs.
Secondly, I replaced the second last FC layer with a GlobalAveragePooling layer, since most of the parameters belong to FC layers.
Total params: 240,961
The accuracy of Conv2d is around 79% after training for 50 epochs.
- -
Total params: 29,244
The accuracy of Conv2d is around 71% after training for 50 epochs.
To summary, through the experiments, I didn't find the SeperateConv2D as promising as it's described in the book, though it did reduce the parameters largely. And it didn't reduce the training time very much. Maybe it's because colab needs extra time for data transimission.
Since the depthwise convnet is highlighted in the book several times and seems promising. I tried to replace all the
Conv2D
withSeperableConv2D
in the code of 5.2 - Using convnets with small datasets. I ran all the programs on colaboratory.First, I didn't change the model structure, in which data augumentation was adopted.
Conv2d
is around 84% after training for 100 epochs.SeperableConv2D
is around 73% after training for 100 epochs.Secondly, I replaced the second last FC layer with a GlobalAveragePooling layer, since most of the parameters belong to FC layers.
Conv2d
is around 79% after training for 50 epochs. - -Conv2d
is around 71% after training for 50 epochs.To summary, through the experiments, I didn't find the
SeperateConv2D
as promising as it's described in the book, though it did reduce the parameters largely. And it didn't reduce the training time very much. Maybe it's because colab needs extra time for data transimission.