Hi everyone,
I am trying to import microsoft/swin-base-patch4-window12-384 (exported from Huggingface with optimium-cli) with:
AxonOnnx.import("../../python/swin-base-patch4-window12-384-export/model.onnx",
batch_size: 32,
num_channels: 3,
height: 384,
width: 384)
but I get an error:
Bug Bug ..!!** (ArgumentError) length at axis 0 must be greater than or equal to 1, got: 0
(nx 0.5.3) lib/nx/shape.ex:1204: Nx.Shape.do_slice/7
(nx 0.5.3) lib/nx.ex:10120: Nx.slice/4
(elixir 1.16.0) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
(axon_onnx 0.4.0) lib/axon_onnx/shared.ex:157: AxonOnnx.Shared.slice_layer/8
(axon_onnx 0.4.0) lib/axon_onnx/deserialize.ex:1379: AxonOnnx.Deserialize.recur_nodes/2
(elixir 1.16.0) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
(axon_onnx 0.4.0) lib/axon_onnx/deserialize.ex:43: AxonOnnx.Deserialize.graph_to_axon/2
iex:1: (file)
Has anyone faced this error? Is there a way swin
model can be imported? I see that in AxonOnnx deserialize_text.exs
tests for swin_t
, swin_b
and swin_s
are commented out with comment TODO: Slicing bug
but I’m not sure if those are related to the above error.