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)
22092209 const Mat& shape = d->net ->blobs ()[blob_index].shape ;
22102210 if (shape.total ())
22112211 {
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 )
22192214 return -1 ;
22202215 }
22212216
22222217 d->blob_mats [blob_index] = in;
2218+
22232219 return 0 ;
22242220}
22252221
You can’t perform that action at this time.
0 commit comments