Search Unity

Question I solved a problem with constants?

Discussion in 'Barracuda' started by yoonitee, Jan 4, 2023.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    I was trying to load this onnx:

    https://github.com/onnx/models/blob/main/vision/classification/mnist/model/mnist-1.onnx

    And it was giving me errors. So I opened it with the onnx modifier:

    https://github.com/ZhangGe6/onnx-modifier

    also changed some reshapes of the constants to 1,8,1,1 instead of 8.

    And saved it again. Then it works without errors. Although gives the wrong output shape.

    Not surprisingly as

    Particular as ONNX writes:
    (batch x channels x width x height)
    But Baraccuda writes:
    (batch x width x height x channels)

    Which can only lead to disaster!

    OK, I tried the mnsit-12.onnx. And that works ok. And correctly classifies digits. Maybe it's because it's a newer version of onnx file.
     
    Last edited: Jan 4, 2023