Fix minor issue

This commit is contained in:
River.Li 2023-06-17 10:39:18 +08:00
parent 48fd6296b5
commit 157b8c4a0a
2 changed files with 3 additions and 3 deletions

View File

@ -363,7 +363,7 @@ void blob_copy(Blob::Ptr src, Blob::Ptr dst) {
if (src->getTensorDesc().getPrecision() != dst->getTensorDesc().getPrecision())
IE_THROW() << "Unimplemented blob transformation from precision " << src->getTensorDesc().getPrecision()
<< " to " << src->getTensorDesc().getPrecision();
<< " to " << dst->getTensorDesc().getPrecision();
if (src->getTensorDesc().getDims() != dst->getTensorDesc().getDims())
IE_THROW() << "Unimplemented blob transformation from different shapes ";

View File

@ -512,12 +512,12 @@ public:
auto dims = shape;
if (shape.size() == 4) {
// NHWC
if (shape[1] == shape[2]) {
if ((shape[1] == shape[2]) && (shape[1] != shape[3])) {
blk_order = {0, 2, 3, 1};
dims[1] = shape[3];
dims[2] = shape[1];
dims[3] = shape[2];
}
}
}
ie::SizeVector dim_offset(shape.size(), 0);
ie::SizeVector blk_strides;