File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2209,17 +2209,13 @@ int Extractor::input(int blob_index, const Mat& in)
2209
2209
const Mat& shape = d->net ->blobs ()[blob_index].shape ;
2210
2210
if (shape.total ())
2211
2211
{
2212
- if ((in.dims == 3 || in.dims == 4 ) && (shape.w != in.w || shape.h != in.h || shape.d != in.d || shape.c != in.c * in.elempack ))
2213
- return -1 ;
2214
-
2215
- if (in.dims == 2 && (shape.w != in.w || shape.h != in.h * in.elempack ))
2216
- return -1 ;
2217
-
2218
- if (in.dims == 1 && (shape.w != in.w * in.elempack ))
2212
+ const Mat& in_shape = in.shape ();
2213
+ if (shape.dims != in_shape.dims || shape.w != in_shape.w || shape.h != in_shape.h || shape.c != in_shape.c )
2219
2214
return -1 ;
2220
2215
}
2221
2216
2222
2217
d->blob_mats [blob_index] = in;
2218
+
2223
2219
return 0 ;
2224
2220
}
2225
2221
You can’t perform that action at this time.
0 commit comments