protected legacy_pad_, replace DeleteDropout with is_test=True

This commit is contained in:
Song Han 2016-07-29 11:44:55 -07:00
parent 3c989347d8
commit cc46464cf6
2 changed files with 2 additions and 3 deletions

View File

@ -163,7 +163,6 @@ class ConvPoolOpBase : public Operator<Context> {
// exact padding values. This isolates out the padding scheme that are growing
// unfortunately complex due to implementational differences from different
// frameworks.
LegacyPadding legacy_pad_;
int pad_;
protected:
@ -176,6 +175,7 @@ class ConvPoolOpBase : public Operator<Context> {
int stride_h_;
int stride_w_;
StorageOrder order_;
LegacyPadding legacy_pad_;
inline void ComputeSizeAndPad(
const int in_size, const int stride, const int kernel,

View File

@ -56,9 +56,8 @@ if __name__ == '__main__':
.read()
)
net, pretrained_params = caffe_translator.TranslateModel(
caffenet, caffenet_pretrained
caffenet, caffenet_pretrained, is_test=True
)
caffe_translator.DeleteDropout(net)
with open('data/testdata/caffe_translator/'
'bvlc_reference_caffenet.translatedmodel',
'w') as fid: