When attempting to append additional operations to a model using the functional API, the runtime reports the following error:
32243 32273 Error Unity KeyNotFoundException: The given key ‘6’ was not present in the dictionary.
32243 32273 Error Unity at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key)
32243 32273 Error Unity at Unity.Sentis.Layers.Conv.Execute (Unity.Sentis.ExecutionContext ctx)
Unity.Sentis.Worker+d__25.MoveNext ()
32243 32273 Error Unity at YOLOQuestUnity.YOLO.YOLOHandler.Update ()
This happens without manipulating the model, simply using the example from the docs.
Code:
var graph = new FunctionalGraph();
var inputs = graph.AddInputs(_model);
var outputs = Functional.Forward(_model, inputs);
// Modify model, though the error occurs regardless of whether this is done or not.
_model = graph.Compile(outputs[0]);
Unity Version 6000.0.20f1
Sentis Version 2.1.0
The model I am running is YOLO11 in ONNX format. The model runs fine when it is not compiled like this through the functional API.
Any help would be appreciated.