您当前的位置:首页 > IT编程 > 深度学习
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch |

自学教程:keras实现densenet源代码Keras Implementation of DenseNet

51自学网 2020-09-30 11:05:15
  深度学习
这篇教程keras实现densenet源代码Keras Implementation of DenseNet写得很实用,希望能帮到您。

Keras Implementation of DenseNet

Original idea and implementation:

Densely Connected Convolutional Network

The figures below are taken from the paper above.

Dense block

Figure 1: A dense block with 5 layers and growth rate 4.

Model scheme

Figure 2: A deep DenseNet with three dense blocks.

Results:

Below, results obtained with a network of depth 40, growth rate 12, 3 dense blocks, dropout rate of 0.2 and trained with SGD for 276 epochs.

All convolutional layer have bias = False meaning we don't use a bias parameter for them.

Weight decay (1E-4) is applied to convolutional layers, batch norm parameters and the last dense layer.

The initial learning rate is 0.1 and the learning rate is divided by 10 after 150 and 225 epochs.

These settings lead to the same results as Densely Connected Convolutional Network: 7 % misclassification rate on the CIFAR10 test set without data augmentation.

Model schemedensenet

Running a CIFAR10 experiment

python run_cifar10.py

optional arguments:

Usage guide:

python run_cifar10.py

optional arguments:

-h, --help show this help message and exit
--batch_size BATCH_SIZE Batch size
--nb_epoch NB_EPOCH  Number of epochs
--depth DEPTH  Network depth
--nb_dense_block NB_DENSE_BLOCK Number of dense blocks
--nb_filter NB_FILTER Initial number of conv filters
--growth_rate GROWTH_RATE Number of new filters added by conv layers
--dropout_rate DROPOUT_RATE  Dropout rate
--learning_rate LEARNING_RATE Learning rate
--weight_decay WEIGHT_DECAY L2 regularization on weights
--plot_architecture PLOT_ARCHITECTURE Save a plot of the network architecture

Architecture

With two dense blocks and 2 convolution operations within each block, the model looks like this:

Model archi

Requirements

  • numpy==1.13.3
  • matplotlib==2.0.2
  • Keras==2.0.8
  • tensorflow==1.3.0 or theano==0.9.0
README.md
Adapt to keras 2.0.8
3 years ago
densenet.py
fix BN axis error
3 years ago
plot_results.py
Improved plot visualisation.
3 years ago
run_cifar10.py
Adapt to keras 2.0.8
Densely Connected Convolutional Network (DenseNet) keras实现代码
DenseNet算法详解
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1