Hi,

I'm trying to inference "yolov3-tiny" model with input batch_size = 4.

The input shape was (4, 3, 416, 416).

However, the shape of the output is as follows:

module.get_output(0) --> (1, 255, 26, 26) 

module.get_output(1) --> (1, 255, 13, 13) 

IMHO, the problem has occurred when the following code is executed:

    input_shape = (4, 3, 416, 416)
    mod, params = relay.frontend.from_darknet(net, dtype=dtype, 
shape=input_shape)

when I print out mod["main"], it seems that the reshape func does not support 
batch input.

    %49 = nn.leaky_relu(%48, alpha=0.1f) /* ty=Tensor[(4, 256, 26, 26), 
float32] */;
    %50 = nn.conv2d(%49, %LAYERTYPE.CONVOLUTIONAL22_weight, padding=[0, 0, 0, 
0], channels=255, kernel_size=[1, 1]) /* ty=Tensor[(4, 255, 26, 26), float32] 
*/;
    %51 = nn.bias_add(%50, %LAYERTYPE.CONVOLUTIONAL22_bias) /* ty=Tensor[(4, 
255, 26, 26), float32] */;
    %52 = reshape(%51, newshape=[1, 3, 85, 26, 26]) /* ty=Tensor[(1, 3, 85, 26, 
26), float32] */;
    %53 = split(%52, indices_or_sections=[2, 4], axis=2) /* ty=(Tensor[(1, 3, 
2, 26, 26), float32], Tensor[(1, 3, 2, 26, 26), float32], Tensor[(1, 3, 81, 26, 
26), float32]) */;
    %54 = %53.0;
    %55 = sigmoid(%54) /* ty=Tensor[(1, 3, 2, 26, 26), float32] */;
    %56 = %53.1;
    %57 = %53.2;
    %58 = sigmoid(%57) /* ty=Tensor[(1, 3, 81, 26, 26), float32] */;
    %59 = (%55, %56, %58);
    %60 = concatenate(%59, axis=2) /* ty=Tensor[(1, 3, 85, 26, 26), float32] */;
    %61 = reshape(%60, newshape=[1, 255, 26, 26]) /* ty=Tensor[(1, 255, 26, 
26), float32] */;

As shown in the above results,

the output shape of the reshape function in %52 is (1, 3, 85, 26, 26) rather 
than (4, 3, 85, 26, 26)

Is there any idea how to resolve such a problem??

best wishes,

R. Kim





---
[Visit 
Topic](https://discuss.tvm.ai/t/yolov3-tiny-batch-input-test-failed/6796/1) to 
respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/48ea5ffb5baaa485af214e7c4adca3d5d42f551cd1e1d82932f79854ae12b478).

Reply via email to