Skip to content

Commit df801a1

Browse files
authored
Merge pull request #8720 from helinwang/vgg16
Fix vgg16 fc layer size: 4096 rather than 512
2 parents d43469b + e9b4886 commit df801a1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

benchmark/cluster/vgg16/vgg16_fluid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ def conv_block(input, num_filter, groups, dropouts):
106106
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])
107107

108108
drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
109-
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
109+
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
110110
bn = fluid.layers.batch_norm(input=fc1, act='relu')
111111
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
112-
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
112+
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
113113
return fc2
114114

115115

python/paddle/fluid/tests/book/test_image_classification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ def conv_block(input, num_filter, groups, dropouts):
8686
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])
8787

8888
drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
89-
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
89+
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
9090
bn = fluid.layers.batch_norm(input=fc1, act='relu')
9191
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
92-
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
92+
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
9393
return fc2
9494

9595

python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def conv_block(input, num_filter, groups, dropouts):
8989
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])
9090

9191
drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
92-
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
92+
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
9393
bn = fluid.layers.batch_norm(input=fc1, act='relu')
9494
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
95-
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
95+
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
9696
return fc2
9797

9898

0 commit comments

Comments
 (0)