Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Help Wanted [Barracuda 0.6.1] Cannot Reshape Array of size ... into shape with multiple of ... elements

Discussion in 'Barracuda' started by san22, May 7, 2020.

  1. san22

    san22

    Joined:
    Aug 23, 2018
    Posts:
    1
    Hi,
    I have converted a pytorch(1.5.0) pth model to onnx.
    When I put the output model into asset folder, I got this error.

    ArgumentException: Cannot reshape array of size 37632 into shape with multiple of 1024 elements
    Barracuda.TensorExtensions.Reshape (Barracuda.TensorShape shape, System.Int32[] size) (at Library/PackageCache/com.unity.barracuda@0.6.1-preview/Barracuda/Core/TensorExtensions.cs:310)

    Model : Yolact Resnet50
    Onnx Version : 9
    Batch size : 1
    Input Shape(1,550,550,3)
    When I got this error, The Reshaping size : (256,1,4,-1)

    I saw a forum page dealing with simillar issues, the comment was to make batch size larger than sequence length. But in my case, input batch is 1(realtime image).

    So have anyone encountered simillar case like me? Or solve it?
     
    alphapibeta likes this.
  2. alphapibeta

    alphapibeta

    Joined:
    May 29, 2020
    Posts:
    1
    Hey San22, can you share the steps how did you convert Yolact Resnet50 to onnx?
     
  3. alexandreribard_unity

    alexandreribard_unity

    Unity Technologies

    Joined:
    Sep 18, 2019
    Posts:
    27
    Could you share the model in question? I believe that issue has been fixed in 1.3.0
     
unityunity