[IE VPU] Enable variable number of inputs for ExpPriorGridGenerator#855
Conversation
|
@monicael, does mdk device part support this feature? |
Yes. MDK side will always consider the layer params first and will check the shape of the second and third tensors only if their respective set of params are 0 ( |
|
@monicael should test be updated as well (add new test cases where another amount of inputs?) |
I don't think that's necessary. In the example in the description, the xml still has three inputs, but the last one (which should have been the input image of the net) has a 1x1x1x1 shape and is not connected to the input of the net. I'm not sure exactly why it appears in this form, instead of missing altogether. But in the current form, the shape of one of the optional inputs doesn't matter if the associated params are not 0. So, for example, in a test where |
Still you add new feature (optional inputs) and there is no tests for that. If there is a concern that such a case should not happen and operation always should have all inputs, so it's better to investigate the root cause rather adding this feature. I understand that in some cases values of optional inputs are ignored, but we need to check that (by writing tests). In addition, through tests it'd be clear under which circumstances some inputs may be omitted. |
Alright, that makes sense. I'll write tests for the optional input cases and will let you know when they're done :) |
Description
ExperimentalPriorGridGenerator layer has at least one input tensor and at most three. The second and third tensors are required only if the parameters
w,handstride_x,stride_y, respectively, are zero. In such cases, the width/height dimensions of the last two layers are used to compute replacements for the parameters.In the current implementation, graph transformer does not allow the ExperimentalPriorGridGenerator layer to have less then three inputs.
Here is an example of how an ExpPriorGridGenerator layer with two inputs is described in xml: