!10120 solve caffe parser not return error

From: @cjh9368
Reviewed-by: @zhanghaibo5,@hangangqiang
Signed-off-by: @hangangqiang
pull/10120/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 02aa0c4b0a

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

Loading…
Cancel
Save