Hello everyone,
I’m new to Barracuda and Onnx in general and I stumbled upon this error while trying to import a .onnx file.
Parameter name: index
System.Collections.Generic.List1[T].get_Item (System.Int32 index) (at <88e4733ac7bc4ae1b496735e6b83bbd3>:0) Unity.Barracuda.Compiler.IRShapeInferenceHelper.ShapeInference.InferOutputShapeNCHW (Unity.Barracuda.Layer layer, System.Int32[ ] inputRanks, Unity.Barracuda.TensorShape[ ] inputShapes) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/Core/Compiler/ShapeInference/IRShapeInferenceHelper.cs:558) Unity.Barracuda.Compiler.IRShapeInferenceHelper.ShapeInference.UpdateKnownTensorShapesNCHW (Unity.Barracuda.Model model, System.Collections.Generic.IDictionary
2[TKey,TValue] ranksByName, System.Collections.Generic.IDictionary2[System.String,System.Nullable
1[Unity.Barracuda.TensorShape]]& shapesByName) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/Core/Compiler/ShapeInference/IRShapeInferenceHelper.cs:781)
Unity.Barracuda.Compiler.Passes.IRShapeInferenceAndConstantFusing.FuseShapesIntoConstants (Unity.Barracuda.Model& model, System.Collections.Generic.IDictionary2[TKey,TValue] shapesByName, System.Collections.Generic.IDictionary
2[TKey,TValue] ranksByName) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/Core/Compiler/Passes/IRShapeInferenceAndConstantFusing.cs:66)
Unity.Barracuda.Compiler.Passes.IRShapeInferenceAndConstantFusing.Run (Unity.Barracuda.Model& model) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/Core/Compiler/Passes/IRShapeInferenceAndConstantFusing.cs:23)
Unity.Barracuda.Compiler.Passes.IntermediateToRunnableNHWCPass.Run (Unity.Barracuda.Model& model) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/Core/Compiler/Passes/IntermediateToRunnableNHWCPass.cs:12)
Unity.Barracuda.ONNX.ONNXModelConverter.Convert (Google.Protobuf.CodedInputStream inputStream) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/ONNX/ONNXModelConverter.cs:170)
Unity.Barracuda.ONNX.ONNXModelConverter.Convert (System.String filePath) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/ONNX/ONNXModelConverter.cs:83)
Unity.Barracuda.ONNXModelImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Editor/ONNXModelImporter.cs:58)
UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <964670f15c6b47f9b8f9340732720473>:0)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I run onnx.checker.check_model on the model before, afraid it was some model error, and since I’m still new I have no idea how to see what’s wrong, I would appreciate if you could explain me how to avoid this in the future
Thanks in advance!