ONE
ONE copied to clipboard
[onert] Support no branch multimodels nnpackage
Support multimodel NN package with no branch
inputs -> model 1 -> model 2 -> ... -> model N-1 -> model N -> outputs
input(s) -> model 1 input(s) model 1 output(s) -> model 2 input(s) ... model N-1 output(s) -> model N input(s) model N output(s) -> output(s)
Originally posted by @hseok-oh in https://github.com/Samsung/ONE/issues/9646#issuecomment-1233678141
This is not scheduled issue yet
Example nnpackage
metadata
{
"major-version" : "1",
"minor-version" : "3",
"patch-version" : "0",
"configs" : [ ],
"models" : [ "mv1.0.tflite", "mv1.1.tflite", "mv1.2.tflite" ],
"model-types" : [ "tflite", "tflite", "tflite" ],
"pkg-inputs" : [ "0:0:0" ],
"pkg-outputs" : [ "2:0:0" ],
"model-connect" : [ { "from" : "0:0:0", "to" : [ "1:0:0" ] }, { "from" : "1:0:0", "to" : [ "2:0:0" ] } ]
}
More test case
metadata
"major-version" : "1",
"minor-version" : "3",
"patch-version" : "0",
"configs" : [ ],
"models" : [ "inception_v3.14to22.tflite", "inception_v3.23to32.tflite", "inception_v3.33to38.tflite" ],
"model-types" : [ "tflite", "tflite", "tflite" ],
"pkg-inputs" : [ "0:0:0", "0:0:1", "0:0:2", "0:0:3" ],
"pkg-outputs" : [ "2:0:0", "2:0:1", "2:0:2" ],
"model-connect" : [ { "from" : "0:0:0", "to" : [ "1:0:0" ] }, { "from" : "0:0:1", "to" : [ "1:0:1" ] },
{ "from" : "0:0:2", "to" : [ "1:0:2" ] }, { "from" : "0:0:3", "to" : [ "1:0:3" ] },
{ "from" : "1:0:0", "to" : [ "2:0:0" ] }, { "from" : "1:0:1", "to" : [ "2:0:1" ] },
{ "from" : "1:0:2", "to" : [ "2:0:2" ] }, { "from" : "1:0:3", "to" : [ "2:0:3" ] } ]
}
Done