Skip to content

Commit

Permalink
Formatting fixes in DenseNet
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jan 10, 2018
1 parent 869114c commit 9c24aed
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions keras/applications/densenet.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# -*- coding: utf-8 -*-
"""DenseNet models for Keras.
# Reference paper:
# Reference paper
- [Densely Connected Convolutional Networks](https://arxiv.org/abs/1608.06993) (CVPR 2017 Best Paper Award)
- [Densely Connected Convolutional Networks]
(https://arxiv.org/abs/1608.06993) (CVPR 2017 Best Paper Award)
# Reference implementation:
# Reference implementation
- [Torch DenseNets](https://github.com/liuzhuang13/DenseNet/blob/master/models/densenet.lua)
- [TensorNets](https://github.com/taehoonlee/tensornets/blob/master/tensornets/densenets.py)
- [Torch DenseNets]
(https://github.com/liuzhuang13/DenseNet/blob/master/models/densenet.lua)
- [TensorNets]
(https://github.com/taehoonlee/tensornets/blob/master/tensornets/densenets.py)
"""
from __future__ import absolute_import
from __future__ import division
Expand Down Expand Up @@ -75,7 +78,7 @@ def transition_block(x, reduction, name):
x = BatchNormalization(axis=bn_axis, epsilon=1.001e-5,
name=name + '_bn')(x)
x = Activation('relu', name=name + '_relu')(x)
x = Conv2D(int(x._keras_shape[bn_axis] * reduction), 1, use_bias=False,
x = Conv2D(int(K.int_shape(x)[bn_axis] * reduction), 1, use_bias=False,
name=name + '_conv')(x)
x = AveragePooling2D(2, strides=2, name=name + '_pool')(x)
return x
Expand Down

0 comments on commit 9c24aed

Please sign in to comment.