Problem with scheduler and running inference on simple fully connected ONNX
What commit version of aidge do you use
-
aidge_core
: 0.2.0 (branch DEV)
Problem description
Python kernel restarts when trying to run inference on simple ONNX, using branch DEV (branch MASTER does not even load the ONNX) The scheduler also seems empty.
Reproducible example code
#############################################################
import aidge_core
import aidge_onnx
import aidge_backend_cpu
import aidge_export_cpp
print("Available backends :")
aidge_core.Tensor.get_available_backends()
!wget https://github.com/stanleybak/acasxu_closed_loop_sim/raw/main/acasxu_dubins/ACASXU_run2a_1_1_batch_2000.onnx -O acasxu.onnx
# ONNX file
onnx_filepath = 'acasxu.onnx'
# Import model again
model = aidge_onnx.load_onnx(onnx_filepath)
# Use remove_flatten recipie
aidge_core.remove_flatten(model)
#Prepare input
input = [[[[0., 0., 0., 0., 0.]]]]
input_tensor = aidge_core.Tensor(input)
print(f"Aidge Input Tensor dimensions: \n{input_tensor.dims()}")
# Create Producer Node for the Graph
input_node = aidge_core.Producer(input_tensor, "input")
# Configuration for input (optional)
input_node.get_operator().set_datatype(aidge_core.DataType.Float32)
input_node.get_operator().set_backend("cpu")
# Link Producer to the Graph
input_node.add_child(model)
# Configure the model
model.set_datatype(aidge_core.DataType.Float32)
model.set_backend("cpu")
# Create SCHEDULER
scheduler = aidge_core.SequentialScheduler(model)
# Run inference !
scheduler.forward(verbose=True)
#############################################################
the log :
python3: /tmp/pip-req-build-6db3w28f/aidge/aidge_core/include/aidge/operator/GenericOperator.hpp:92: virtual bool Aidge::GenericOperator_Op::outputDimsForwarded() const: Assertion `false && "GenericOperator cannot forward dims"' failed.