Skip to content

Commit c517bb1

Browse files
committed
renaming layer in resnet to repeats
1 parent 19852d2 commit c517bb1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

python/10_residual_network.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def residual_network(x, n_outputs,
3636
"""
3737
# %%
3838
LayerBlock = namedtuple(
39-
'LayerBlock', ['num_layers', 'num_filters', 'bottleneck_size'])
39+
'LayerBlock', ['num_repeats', 'num_filters', 'bottleneck_size'])
4040
blocks = [LayerBlock(3, 128, 32),
4141
LayerBlock(3, 256, 64),
4242
LayerBlock(3, 512, 128),
@@ -69,9 +69,9 @@ def residual_network(x, n_outputs,
6969
# %%
7070
# Loop through all res blocks
7171
for block_i, block in enumerate(blocks):
72-
for layer_i in range(block.num_layers):
72+
for repeat_i in range(block.num_repeats):
7373

74-
name = 'block_%d/layer_%d' % (block_i, layer_i)
74+
name = 'block_%d/repeat_%d' % (block_i, repeat_i)
7575
conv = conv2d(net, block.bottleneck_size, k_h=1, k_w=1,
7676
padding='VALID', stride_h=1, stride_w=1,
7777
activation=activation,

0 commit comments

Comments
 (0)