You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the ONNX model from issue #675, an error parsing the Split operator occurs:
ERROR burn_import::logger: PANIC => panicked at crates/onnx-ir/src/dim_inference.rs:914:17:
Split: Input tensor shape is not defined
thread 'main' panicked at crates/onnx-ir/src/dim_inference.rs:914:17:
Split: Input tensor shape is not defined
To Reproduce
Run the procedure to read the yolov8n.onnx file described in burn-import crate leads to the following log:
Error log
INFO burn_import::onnx::to_burn:Starting to convert ONNX to BurnDEBUG burn_import::onnx::to_burn:Output directory:"./out"INFO burn_import::onnx::to_burn:Converting"../../../Downloads/yolov8n.onnx"DEBUG burn_import::onnx::to_burn:Input file name:"yolov8n"DEBUG burn_import::onnx::to_burn:Output file:"./out/yolov8n"INFO burn_import::onnx::to_burn:Generating model from "../../../Downloads/yolov8n.onnx"DEBUG burn_import::onnx::to_burn:Development mode: true
DEBUG burn_import::onnx::to_burn:Output file:"./out/yolov8n"INFO onnx_ir::from_onnx:ParsingONNX file: ../../../Downloads/yolov8n.onnxDEBUG onnx_ir::from_onnx:Number of nodes:259DEBUG onnx_ir::from_onnx:Number of inputs:1DEBUG onnx_ir::from_onnx:Number of initializers:127DEBUG onnx_ir::from_onnx:Number of outputs:1DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type "Conv"
DEBUG onnx_ir::from_onnx: renaming node "/model.0/conv/Conv"
DEBUG onnx_ir::from_onnx: checking node conv2d1 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.0.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([16,3,3,3])}),value:Some(Float32s([-2.0546875, -0.18859863,1.90625, -6.5625,0.5961914,6.90625, -6.0117188, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.0.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([16])}),value:Some(Float32s([1.3603516,2.875,1.5947266,1.5214844,6.7148438,1.3818359,4.3203125, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d1"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.0/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid1"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.0/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul1"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.1/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d2 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.1.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([32,16,3,3])}),value:Some(Float32s([-0.06317139, -0.25390625, -0.54833984,0.066101074,0.08123779,0.72509766,0.03213501, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.1.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([32])}),value:Some(Float32s([0.83496094,0.13500977,4.2421875,0.1315918, -0.58154297,1.4902344,2.6269531, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d2"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.1/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid2"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.1/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul2"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.2/cv1/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d3 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.cv1.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([32,32,1,1])}),value:Some(Float32s([0.020202637,0.053497314, -0.023925781, -0.07409668, -0.045410156,0.023269653,0.069885254, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.cv1.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([32])}),value:Some(Float32s([2.8769531,1.6123047,1.3994141,2.9140625,1.5839844,3.7949219, -0.51464844, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d3"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.2/cv1/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid3"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.2/cv1/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul3"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Split"DEBUG onnx_ir::from_onnx: renaming node "/model.2/Split"DEBUG onnx_ir::from_onnx: adding node "split1"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/cv1/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d4 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.m.0.cv1.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([16,16,3,3])}),value:Some(Float32s([-0.0692749,0.009162903,0.041137695, -0.13903809, -0.25756836, -0.060638428, -0.08898926, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.m.0.cv1.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([16])}),value:Some(Float32s([1.8271484,3.9492188,2.0332031,3.1132813,3.2929688,2.8730469, -5.1289063, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d4"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/cv1/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid4"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/cv1/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul4"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/cv2/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d5 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.m.0.cv2.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([16,16,3,3])}),value:Some(Float32s([-0.010246277, -0.09918213, -0.04260254,0.022415161,0.26660156,0.059295654, -0.026519775, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.m.0.cv2.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([16])}),value:Some(Float32s([1.5976563,1.5966797,3.5332031, -1.4785156,1.7324219, -1.6542969,5.2734375, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d5"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/cv2/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid5"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/cv2/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul5"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Add"DEBUG onnx_ir::from_onnx: renaming node "/model.2/m.0/Add"DEBUG onnx_ir::dim_inference:Input0 has no known shape, cannot predict broadcast result shape
DEBUG onnx_ir::from_onnx: adding node "add1"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Concat"DEBUG onnx_ir::from_onnx: renaming node "/model.2/Concat"DEBUG onnx_ir::from_onnx: adding node "concat1"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.2/cv2/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d6 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.cv2.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([32,48,1,1])}),value:Some(Float32s([-0.028778076,0.0006098747, -0.08135986, -0.0025787354,0.027069092,0.016616821,0.031677246, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.2.cv2.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([32])}),value:Some(Float32s([1.0126953,2.5234375,3.3945313,0.36401367,3.5859375,2.5644531,3.1894531, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d6"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.2/cv2/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid6"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.2/cv2/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul6"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.3/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d7 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.3.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([64,32,3,3])}),value:Some(Float32s([0.008285522,0.00031018257, -0.009002686, -0.023864746, -0.06591797, -0.04006958, -0.013717651, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.3.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([64])}),value:Some(Float32s([0.7006836,0.6904297,3.4414063,1.2470703, -0.92529297,1.2861328, -0.15722656, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d7"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.3/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid7"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.3/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul7"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Conv"DEBUG onnx_ir::from_onnx: renaming node "/model.4/cv1/conv/Conv"DEBUG onnx_ir::from_onnx: checking node conv2d8 for constants
DEBUG onnx_ir::from_onnx: checking input Argument{name:"model.4.cv1.conv.weight",ty:Tensor(TensorType{elem_type:Float32,dim:4,shape:Some([64,64,1,1])}),value:Some(Float32s([-0.12878418,0.31835938,0.04083252,0.01209259, -0.546875, -0.15966797, -0.20336914, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: checking input Argument{name:"model.4.cv1.conv.bias",ty:Tensor(TensorType{elem_type:Float32,dim:1,shape:Some([64])}),value:Some(Float32s([0.64941406,1.1298828,3.0371094, -0.3557129,2.453125, -3.0019531,0.03189087, ...])),passed:false} for constDEBUG onnx_ir::from_onnx: adding node "conv2d8"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Sigmoid"DEBUG onnx_ir::from_onnx: renaming node "/model.4/cv1/act/Sigmoid"DEBUG onnx_ir::from_onnx: adding node "sigmoid8"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Mul"DEBUG onnx_ir::from_onnx: renaming node "/model.4/cv1/act/Mul"DEBUG onnx_ir::from_onnx: adding node "mul8"DEBUG onnx_ir::proto_conversion:ConvertingONNX node with type"Split"DEBUG onnx_ir::from_onnx: renaming node "/model.4/Split"ERROR burn_import::logger:PANIC => panicked at crates/onnx-ir/src/dim_inference.rs:914:17:Split:Input tensor shape is not defined
thread 'main' panicked at crates/onnx-ir/src/dim_inference.rs:914:17:Split:Input tensor shape is not defined
Expected behavior
The above procedure should terminate without any panic.
The text was updated successfully, but these errors were encountered:
None => panic!("Split: Input tensor shape is not defined"),
};
Now that I think about it, I don't think that's required to get the output rank. The input is split along a dimension but all the outputs will have the same rank, just different lengths. So we can remove probably remove these checks.
Describe the bug
Running the
ONNX
model from issue #675, an error parsing theSplit
operator occurs:To Reproduce
Run the procedure to read the
yolov8n.onnx
file described inburn-import
crate leads to the following log:Error log
Expected behavior
The above procedure should terminate without any panic.
The text was updated successfully, but these errors were encountered: