Wrong error message for unsupported operators
What commit version of aidge do you use
-
aidge_core
: 0.2.0, dev branch
Problem description
I've loaded an onnx model with a Flatten and a Sub layer and forgot to do the fuse_mul_add so the remove_flatten did not work. Following this I get one of the two error (randomly):
-
Cannot compute output dim of a GenericOperator
which seems logical - or
Traceback (most recent call last):
File line 31, in <module>
scheduler.forward()
RuntimeError: Unsopported Tensor shape for Div Operation
So:
- There is a typo "Unsopported" => "Unsupported", a quick search in the sources of the operators show a few other "Unsopported"
- It mentions the wrong layer, except for the one in
aidge\aidge_core\src\operator\Add.cpp
, the ones inMul.cpp
,Pow.cpp
andSub.cpp
that I found mentionDiv
as well - I don't know why I have this error nor why it appears at random why the other.
(Adding the fuse_mul_add and the remove_flatten recipes work afterwards so this is a minor issue I guess)
What I'm running is:
import aidge_backend_cpu
import aidge_core
import aidge_onnx
graph = aidge_onnx.load_onnx("model_acas.onnx")
graph.set_backend("cpu")
graph.save("mnist_fc")
import numpy as np
input_data = np.array(np.zeros((784,)) + 0.5).astype(np.float32)
input_tensor = aidge_core.Tensor(input_data)
input_node = aidge_core.Producer(input_tensor, "X")
input_node.add_child(graph)
graph.add(input_node)
graph.set_datatype(aidge_core.DataType.Float32)
scheduler = aidge_core.SequentialScheduler(graph)
scheduler.generate_scheduling()
scheduler.forward()
Model loaded model_acas.onnx