hello i exported alexnet model from matlab as onnx format. when i import the model in opencv 4.1 and run first subtruction layer it multiply by the image insted subtruction
i set constant values per row for input image and see the result multiplied by the mean image.
convnet=alexnet exportONNXNetwork(convnet,'filenameONNX.onnx')
cv::Mat image(227, 227, CV_32FC3, data.data());
image = image.t();
cv::dnn::Net net;
net = cv::dnn::readNetFromONNX(ALEXNETONNX);
Mat inputBlob = blobFromImage(image);
net.setInput(inputBlob);
auto imgout_input_Sub = net.forward("input_Sub");
int np0 = imgout_input_Sub.total();
cv::Mat imageSub1(227, 227, CV_32FC1, (float*)imgout_input_Sub.data);
input image first row was 1 , second 2, and 10th was 10, i see it multiplied by the average image inside alexnet !