X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.MachineLearning.Train%2FTizen.MachineLearning.Train%2FModel.cs;h=c132fddd0537ec061cc9ffe4db91884ecec1f8c3;hb=b0ac33c8c741d098b46c3cb06e7121c5212b53c0;hp=66ecacc95b0d88a262123769391e388373154a42;hpb=63851a52c62aaf416345fad757b2b753f8c3e3da;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.MachineLearning.Train/Tizen.MachineLearning.Train/Model.cs b/src/Tizen.MachineLearning.Train/Tizen.MachineLearning.Train/Model.cs index 66ecacc..c132fdd 100644 --- a/src/Tizen.MachineLearning.Train/Tizen.MachineLearning.Train/Model.cs +++ b/src/Tizen.MachineLearning.Train/Tizen.MachineLearning.Train/Model.cs @@ -39,7 +39,7 @@ namespace Tizen.MachineLearning.Train private bool _disposed = false; /// - /// Create a new Model instance. + /// Constructs the neural network model. /// /// 10 public Model() @@ -49,6 +49,19 @@ namespace Tizen.MachineLearning.Train } /// + /// Constructs the neural network model with the given configuration file. + /// + /// The nntrainer model configuration file. + /// 10 + public Model(string modelConf) + { + if (string.IsNullOrEmpty(modelConf)) + NNTrainer.CheckException(NNTrainerError.InvalidParameter, "modelConf is null"); + + NNTrainerError ret = Interop.Model.ConstructWithConf(modelConf, out _handle); + NNTrainer.CheckException(ret, "Failed to create model instance with modelConf"); + } + /// /// Destructor of Model /// /// 10