Skip to content

Commit dff4fe2

Browse files
committed
Revert "Fix a bug in resnet; add performance test in static model"
This reverts commit b6a7ffd.
1 parent b6a7ffd commit dff4fe2

File tree

3 files changed

+7
-173
lines changed

3 files changed

+7
-173
lines changed

tensorlayer/models/resnet.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,21 @@ def ResNet50(pretrained=False, end_with='fc1000', n_classes=1000, name=None):
150150
n = BatchNorm(name='bn_conv1', act='relu')(n)
151151
n = MaxPool2d((3, 3), strides=(2, 2), name='max_pool1')(n)
152152

153-
for i, block_name in enumerate(block_names):
154-
if len(block_name) == 2:
155-
stage = int(block_name[0])
156-
block = block_name[1]
153+
for i, name in enumerate(block_names):
154+
if len(name) == 2:
155+
stage = int(name[0])
156+
block = name[1]
157157
if block == 'a':
158158
strides = (1, 1) if stage == 2 else (2, 2)
159159
n = conv_block(n, 3, block_filters[stage - 2], stage=stage, block=block, strides=strides)
160160
else:
161161
n = identity_block(n, 3, block_filters[stage - 2], stage=stage, block=block)
162-
elif block_name == 'avg_pool':
162+
elif name == 'avg_pool':
163163
n = GlobalMeanPool2d(name='avg_pool')(n)
164-
elif block_name == 'fc1000':
164+
elif name == 'fc1000':
165165
n = Dense(n_classes, name='fc1000')(n)
166166

167-
if block_name == end_with:
167+
if name == end_with:
168168
break
169169

170170
network = Model(inputs=ni, outputs=n, name=name)

tests/performance_test/vgg/tl2-static-autograph.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

tests/performance_test/vgg/tl2-static-eager.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)