Browse Source

solve caffe parrser not return error

tags/v1.1.0
cjh9368 5 years ago
parent
commit
b829d0f0e4
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/lite/tools/converter/parser/caffe/caffe_convolution_parser.cc

+ 4
- 0
mindspore/lite/tools/converter/parser/caffe/caffe_convolution_parser.cc View File

@@ -111,6 +111,10 @@ PrimitiveC *CaffeConvolutionParser::ParseLitePrimitive(const caffe::LayerParamet
MS_LOG(ERROR) << "conv channel out failed";
return nullptr;
}
if (weight.blobs_size() < 1) {
MS_LOG(ERROR) << "conv weight blob is empty";
return nullptr;
}
auto &weightBlob = weight.blobs(0);
if (weightBlob.has_shape()) {
attr->channelIn = weightBlob.shape().dim(1) * attr->group;


Loading…
Cancel
Save