Open mrhosseini opened 4 years ago
Changing this line to the following will solve the problem. But I am not sure if this works for all the cases.
rt_out[i] = (dnnType *) netRT->buffersRT[netRT->pluginFactory->n_yolos - i] + netRT->buffersDIM[netRT->pluginFactory->n_yolos - i].tot() * bi;
Hi, The order of buffersRt should always be: Input Output 0 Output 1 Etc.
If this really happen I need to check
The order of buffersRt should always be: Input Output 0 Output 1 Etc.
What happens is that order of yolo layers in NetworkRT::pluginFactory
is different from bufferRT
. Example for 2 yolo layers :
Input
Output 0 [26 x 26 x 18]
Output 1 [13 x 13 x 18]
in bufferRT
but in pluginFactory
:
Yolo 0 [13 x 13 x 18]
Yolo 1 [26 x 26 x 18]
In yolov3_tiny network dimensions of the first yolo layer is
13 x 13 x 255
and dimensions of the second one is26 x 26 x 255
. However, if we use a network configuration in which unlike yolov3_tiny the dimensions of the first yolo layer is bigger than the second one (like this), this line:will fail with the error:
The problem is that
output_dim
of the layer is different from the dimensions of thedstData
and with debugging it can be found that for the first yolo layer theoutput_dim
of it equals to the second one and vice versa. (Or we can say that the dimensions ofdstData
belongs the other layer).I'm not sure if other parameters of the layer has the same problem.