Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Fix bug in RemoveBNScale
Browse files Browse the repository at this point in the history
To handle "conv----bn" structure

Signed-off-by: Jin, Ge <[email protected]>
  • Loading branch information
jinge90 committed Jul 3, 2017
1 parent 792b0d1 commit 881163a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/caffe/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,9 @@ void Net<Dtype>::RemoveBNScale(const NetParameter& param,
shared_ptr<LayerParameter> scale_layer_param(new LayerParameter());
RecoverScaleFromBN(child_layer_param, *scale_layer_param, (Dtype)1, (Dtype)0);
AdjustConvLayer<Dtype>(*layer_param, child_layer_param, *scale_layer_param, is_net_init);
}
} else {
AdjustConvLayer<Dtype>(*layer_param, child_layer_param, grandchild_layer_param, true);
}
if (bn_scale_remove == false) bn_scale_remove = true;
layers_to_drop.insert(child_layer_param.name());
}
Expand Down

0 comments on commit 881163a

Please sign in to comment.