[ML][single] SingleShot.setValue and SingleShot.getValue 69/253569/4
authorRafal Walczyna <r.walczyna@samsung.com>
Mon, 15 Feb 2021 14:02:14 +0000 (15:02 +0100)
committerRafal Walczyna <r.walczyna@samsung.com>
Tue, 16 Feb 2021 14:46:48 +0000 (15:46 +0100)
commit2461f44f70c3d7a5db14f6308cfc3f062e42bfbb
tree56c5d0b3c9387e5c4f1e50e04a2f6586909c543f
parente7500bf034494807d877c582755e0922cff44611
[ML][single] SingleShot.setValue and SingleShot.getValue

ACR: TWDAPI-273

Test code:
var m = tizen.ml.single.openModel('documents/mobilenet_v1_1.0_224_quant.tflite')
var arr = ["input", "inputtype", "inputlayout", "output", "outputtype", "outputlayout",
           "accelerator", "is-updatable", "inputname", "outputname", "custom" ]

arr.forEach((v) => {
    try {
        console.log(v, ':', m.getValue(v));
    } catch (error) {
        console.log(v, ':', error.message)
    }
});

m.setValue("input", "3:244:244:4");
console.log("input: " + m.getValue("input"))
m.setValue("is-updatable", "true");
console.log("is-updatable: " + m.getValue("is-updatable"))

[Verification] Built successful. Tested in Chrome Dev console.

Change-Id: Id911ed1717fb7b96c7ac75350ea27c78786cc5d9
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
src/ml/js/ml_single.js
src/ml/ml_instance.cc
src/ml/ml_instance.h
src/ml/ml_single_manager.cc
src/ml/ml_single_manager.h
src/ml/ml_singleshot.cc
src/ml/ml_singleshot.h