资源算法DenseNet-Keras-implementation

DenseNet-Keras-implementation

2020-03-30 | |  46 |   0 |   0

DenseNet and DenseNet-BC implementation in Keras (Tensorflow Backend)

An implementation of the DenseNet architecture with growth rate = 12, L = 40 (~1M parameters).

usage: densenet.py [-h] [--epochs EPOCHS] [--layers LAYERS] [--growth GROWTH]
                   [--filters FILTERS] [--classes CLASSES] [--blocks BLOCKS]
                   [--aug AUG] [--compression COMPRESSION]
                   [--upsample UPSAMPLE]

optional arguments:
  -h, --help            show this help message and exit
  --epochs EPOCHS       Number of epochs to run
  --layers LAYERS       Number of layers defined as (depth-4)/no_dense_blocks
  --growth GROWTH       k - How many filters to add each convolution
  --filters FILTERS     Number of inital conv_filter
  --classes CLASSES     Number of output classes
  --blocks BLOCKS       Number of Dense blocks
  --aug AUG             To perform data augmentation, set to 1
  --compression COMPRESSION
                        [0-1] to specify bottleneck compression (0.5)
  --upsample UPSAMPLE   Upsample and concatenate initial conv to last conv

DenseNet-BC growth rate 12, inital conv filters 24, L = 100. (~800k parameters)

To implement Densenet with growth_rate = 12, Layers = 40 - CIFAR10 validation error rate 6.22%:

To reproduce:

python densenet.py --upsample 0

To implement Densenet-BC with Layers = 100, compression = 0.5 - Validation error rate 5.44%:

python densenet.py --upsample 0 --growth 12 --filters 24 --compression 0.5 --layers 16

I also tested whether adding an upsampling and concatenation layer improved the results - The logic was to have a skip connection between the last conv2d and the input_conv2d - Whilst the parameter space more than doubles (2.8M) for Densenet k=12, L=40 - the accuracy doesn't change.


上一篇:py_densenet

下一篇:Densenet_multi_gpu_tfrecords

用户评价
全部评价

热门资源

  • TensorFlow-Course

    This repository aims to provide simple and read...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • mxnet_VanillaCNN

    This is a mxnet implementation of the Vanilla C...

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...

  • Klukshu-Sockeye-...

    KLUKSHU SOCKEYE PROJECTS 2016 This repositor...