Skip to content

VGGNet definition is incorrect #8718

Closed
Closed
@tonyyang-svail

Description

@tonyyang-svail

The hidden dimension of the last two layers should be 4096 (this gives ~400M model size). Ours is 512(this yields ~70M as model size).

drop = fluid.layers.dropout(x=conv5, dropout_prob=0.5)
fc1 = fluid.layers.fc(input=drop, size=512, 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)

This will affect our benchmark with other frameworks.

The definition in other frameworks: https://github.com/ry/tensorflow-vgg16/blob/97a9e1ff663ac7238f986d8b8247f4ab81f83432/vgg16.py#L86-L89 , or https://gist.github.com/baraldilorenzo/07d7802847aaad0a35d3#file-vgg-16_keras-py-L46

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions