}
};
+Model.prototype.load = function () {
+ var args = validator_.validateArgs(arguments, [
+ {
+ name: 'path',
+ type: types_.STRING
+ },
+ {
+ name: 'format',
+ type: types_.ENUM,
+ values: Object.values(SaveFormat)
+ }
+ ]);
+
+ var callArgs = {
+ id: this._id,
+ savePath: args.path,
+ saveFormat: args.format
+ }
+
+ try {
+ callArgs.savePath = tizen.filesystem.toURI(args.path);
+ } catch (e) {
+ throw new WebAPIException(WebAPIException.InvalidValuesError, 'Invalid file path given');
+ }
+
+ if (!tizen.filesystem.pathExists(callArgs.savePath)) {
+ throw new WebAPIException(WebAPIException.NotFoundError, 'Path not found');
+ }
+
+ var result = native_.callSync('MLTrainerModelLoad', callArgs);
+
+ if (native_.isFailure(result)) {
+ throw native_.getErrorObjectAndValidate(
+ result,
+ ValidModelSaveExceptions,
+ AbortError
+ );
+ }
+};
+
Model.prototype.addLayer = function() {
var args = validator_.validateArgs(arguments, [
{