[mir-caffe-importer] Fixed a bug in CaffeOpCreator (#8243)
authorGusev Dmitry/Engineer/AI Tools Lab /SRR/Samsung Electronics <d.gusev@partner.samsung.com>
Wed, 16 Oct 2019 18:43:55 +0000 (21:43 +0300)
committerAlexander Efimov/./AI Tools Lab/Samsung Electronics <a.efimov@samsung.com>
Wed, 16 Oct 2019 18:43:55 +0000 (21:43 +0300)
Setting attributes values is corrected.

Signed-off-by: Dmitry Gusev <d.gusev@partner.samsung.com>
compiler/mir-caffe-importer/caffe_op_creator.cpp

index b902e93..ceb9182 100644 (file)
@@ -482,6 +482,7 @@ CaffeOpCreator::convertPooling(const caffe::LayerParameter &layer,
     case PoolingParameter::AVE:
     {
       AvgPool2DOpAttributes attributes_avg;
+      attributes_avg.data_format = DataFormat::NCHW;
       convertPoolingParam(params, input->getShape(), attributes_avg);
       result = createOp<ops::AvgPool2DOp>(input, attributes_avg)->getOutput(0);
       break;
@@ -489,6 +490,7 @@ CaffeOpCreator::convertPooling(const caffe::LayerParameter &layer,
     case PoolingParameter::MAX:
     {
       MaxPool2DOpAttributes attributes_max;
+      attributes_max.data_format = DataFormat::NCHW;
       convertPoolingParam(params, input->getShape(), attributes_max);
       result = createOp<ops::MaxPool2DOp>(input, attributes_max)->getOutput(0);
       break;