Cannot export some imported onnx models
What commit version of aidge do you use
-
aidge_core
: dev -
aidge_onnx
: dev
Problem description
When I try to export some models, that were first imported from ONNX, I get an empty onnx file, but not with all models. Also just using aidge_core.sequential
and exporting works fine.
What I'm using:
aidge_model = aidge_onnx.load_onnx("model_mnist_fc.onnx", verbose=False)
aidge_core.remove_flatten(aidge_model)
aidge_model.save("saved_model") # this works fine
input_node = aidge_core.Producer([1, 1, 28, 28], "XXX")
input_node.add_child(aidge_model)
aidge_model.add(input_node)
# Set up the backend
aidge_model.set_datatype(aidge_core.dtype.float32)
aidge_model.set_backend("cpu")
aidge_onnx.export_onnx(aidge_model, "model_normal.onnx")
I cannot really see a common denominator in what fails and what does not fails so:
Model working: model_mnist_fc.onnx (28, 28, 1)
Model not working: ConvNet.onnx (from PTQ tuto (28, 28, 1)) or model_matmul.onnx (2,)