Skip to content

Commit 953c2a3

Browse files
committed
add doc for resnet50
1 parent 09cda37 commit 953c2a3

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docs/modules/models.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ TensorLayer provides many pretrained models, you can easily use the whole or a p
1313
VGG19
1414
SqueezeNetV1
1515
MobileNetV1
16+
ResNet50
1617
Seq2seq
1718
Seq2seqLuongAttention
1819

@@ -41,6 +42,11 @@ MobileNetV1
4142

4243
.. autofunction:: MobileNetV1
4344

45+
ResNet50
46+
----------------
47+
48+
.. autofunction:: ResNet50
49+
4450
Seq2seq
4551
------------------------
4652

tensorlayer/models/resnet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def conv_block(input, kernel_size, n_filters, stage, block, strides=(2, 2)):
105105
return x
106106

107107

108-
block_names = ['2a', '2b', '2c', '3a', '3b', '3c', '3d', '4a', '4b', '4c', '4d', '4e', '4f',
109-
'5a', '5b', '5c'] + ['avg_pool', 'fc1000']
108+
block_names = ['2a', '2b', '2c', '3a', '3b', '3c', '3d', '4a', '4b', '4c', '4d', '4e', '4f', '5a', '5b', '5c'
109+
] + ['avg_pool', 'fc1000']
110110
block_filters = [[64, 64, 256], [128, 128, 512], [256, 256, 1024], [512, 512, 2048]]
111111

112112

@@ -178,7 +178,8 @@ def ResNet50(pretrained=False, end_with='fc1000', n_classes=1000, name=None):
178178
def restore_params(network, path='models'):
179179
logging.info("Restore pre-trained parameters")
180180
maybe_download_and_extract(
181-
'resnet50_weights_tf_dim_ordering_tf_kernels.h5', path,
181+
'resnet50_weights_tf_dim_ordering_tf_kernels.h5',
182+
path,
182183
'https://github.com/fchollet/deep-learning-models/releases/download/v0.2/',
183184
) # ls -al
184185
try:

0 commit comments

Comments
 (0)