Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    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:
    48
    Could you share the model in question? I believe that issue has been fixed in 1.3.0
     
  4. lftobar14

    lftobar14

    Joined:
    Sep 30, 2021
    Posts:
    1
    Hi San22, were you able to solve the problem?
     
  5. alexandreribard_unity

    alexandreribard_unity

    Unity Technologies

    Joined:
    Sep 18, 2019
    Posts:
    48
    @lftobar14 if you are getting a similar issue, can you try on latest Barracuda version?
    If it still doesn't work, could you share with us the problematic model?
    Thanks!
     
unityunity