- tizen.ml.single and tizen.ml.prototype should be not writable
- TensorsInfo.addTensorsInfo should return newly added tensors info id
- ValidateBufferForTensorsData issue
[Verification] Tested in chromium console
Change-Id: I9ba7e074c79ffc7acb4de32a87a42db6c5f22beb
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
} else if (false == buffer instanceof ArrayType) {
throw new WebAPIException(
WebAPIException.TYPE_MISMATCH_ERR,
- 'buffer array has incompatible type, expected: ' +
- ArrayType.name +
- ', got: ' +
- buffer.constructor.name
+ 'buffer has incompatible type, expected: ' + ArrayType.name
);
}
return ret;
AbortError
);
}
+ return native_.getResultObject(result);
};
var TensorsInfoGettersSettersValidExceptions = [
* limitations under the License.
*/
-var MachineLearningManager = function() {};
-
-MachineLearningManager.prototype.single = new MachineLearningSingle();
-
-MachineLearningManager.prototype.pipeline = new MachineLearningPipeline();
+var MachineLearningManager = function() {
+ Object.defineProperties(this, {
+ single: {
+ enumerable: true,
+ writable: false,
+ value: new MachineLearningSingle()
+ },
+ pipeline: {
+ enumerable: true,
+ writable: false,
+ value: new MachineLearningPipeline()
+ }
+ });
+};
var NNFWType = {
ANY: 'ANY',
return;
}
- ReportSuccess(out);
+ int count = tensorsInfo->Count() - 1;
+
+ picojson::value val = picojson::value{static_cast<double>(count)};
+ ReportSuccess(val, out);
}
void MlInstance::MLTensorsInfoGetDimensions(const picojson::value& args, picojson::object& out) {