-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
DNN: network loading should not initialize inputs #16618
Copy link
Copy link
Closed
Milestone
Description
Test code:
// 1. load network
const string proto = findDataFile("dnn/bvlc_alexnet.prototxt");
const string model = findDataFile("dnn/bvlc_alexnet.caffemodel", false);
Net net = readNetFromCaffe(proto, model);
// 2. mistake: no inputs are specified through .setInput()
// 3. try inference
Mat res;
EXPECT_THROW(
{
res = net.forward(); // no inputs after loading => should fail
}, cv::Exception);
EXPECT_TRUE(res.empty()) << res.size;Reactions are currently unavailable