We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b039b87 commit ed98c0aCopy full SHA for ed98c0a
src/net.cpp
@@ -2218,6 +2218,10 @@ int Extractor::input(int blob_index, const Mat& in)
2218
if (blob_index < 0 || blob_index >= (int)d->blob_mats.size())
2219
return -1;
2220
2221
+ Mat shape = d->net->blobs()[blob_index].shape;
2222
+ if (shape.total() && (shape.w != in.w) && (shape.h != in.h) && (shape.d != in.d) && (shape.c != in.c))
2223
+ return -1;
2224
+
2225
d->blob_mats[blob_index] = in;
2226
2227
return 0;
0 commit comments