Skip to content

Commit

Permalink
Merge pull request #8720 from helinwang/vgg16
Browse files Browse the repository at this point in the history
Fix vgg16 fc layer size: 4096 rather than 512
  • Loading branch information
helinwang committed Mar 5, 2018
2 parents d43469b + e9b4886 commit df801a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions benchmark/cluster/vgg16/vgg16_fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ def conv_block(input, num_filter, groups, dropouts):
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])

drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
bn = fluid.layers.batch_norm(input=fc1, act='relu')
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
return fc2


Expand Down
4 changes: 2 additions & 2 deletions python/paddle/fluid/tests/book/test_image_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def conv_block(input, num_filter, groups, dropouts):
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])

drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
bn = fluid.layers.batch_norm(input=fc1, act='relu')
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
return fc2


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ def conv_block(input, num_filter, groups, dropouts):
conv5 = conv_block(conv4, 512, 3, [0.4, 0.4, 0])

drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
fc1 = fluid.layers.fc(input=drop, size=512, act=None)
fc1 = fluid.layers.fc(input=drop, size=4096, act=None)
bn = fluid.layers.batch_norm(input=fc1, act='relu')
drop2 = fluid.layers.dropout(x=bn, dropout_prob=0.5)
fc2 = fluid.layers.fc(input=drop2, size=512, act=None)
fc2 = fluid.layers.fc(input=drop2, size=4096, act=None)
return fc2


Expand Down

0 comments on commit df801a1

Please sign in to comment.