-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
@@ -268,14 +269,14 @@ class BatchNorm { | |||
framework::AttributeMap attrs; | |||
attrs["shape"] = std::vector<int>{channel_in}; | |||
attrs["value"] = 1.0f; | |||
scale_ = GlobalParameterCollection().AddBNParameter( | |||
scale_ = GlobalParameterCollection().AddParameter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
src/example/cifar/test_cifar.cc
Outdated
|
||
Adam adam(0.001); | ||
|
||
auto vgg16_forward = [&](VariableHandle input) -> VariableHandle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to support testing on batch norm, maybe do auto vgg16_forward = [&](VariableHandle input, bool is_test) -> VariableHandle {
src/example/cifar/test_cifar.cc
Outdated
filename1, {32, 3, 32, 32, 32, 1}, {4, 2}, {0, 0}); | ||
auto test_reader = CreateRecordioFileReader( | ||
filename2, {32, 3, 32, 32, 32, 1}, {4, 2}, {0, 0}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder: add batchnorm and pool.
f98d412
to
2c8d414
Compare
01b1b52
to
16e244c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
auto vgg16_forward = [&](VariableHandle input, | ||
bool is_test) -> VariableHandle { | ||
paddle::framework::AttributeMap attrs; | ||
attrs["is_test"] = is_test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like bn and dropout are sharing an attribute. Maybe separate them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Will fix it in the next pr.
No description provided.