[API] Update C-API
authorParichay Kapoor <pk.kapoor@samsung.com>
Tue, 7 Jul 2020 08:24:28 +0000 (17:24 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 9 Jul 2020 10:58:15 +0000 (19:58 +0900)
commit5cf95201ca96828a14cbac5855ce4bcafe13f0ad
tree5b9d75107dc2fba7552be92dfd99f98783250bcf
parent40c34fbbeee0185c2982522b7f21632f6e90761d
[API] Update C-API

Update C-API and corresponding code changes

Major Changes:

1. ml_nnmodel_compile_with_conf() replaced with ml_nnmodel_construct_with_conf().
This new function loads the model from the config file but does not initialize.
ml_nnmodel_compile() should be called after ml_nnmodel_construct_with_conf() before training.

2. ml_nnmodel_compile() does not take optimizer as an input.
Rather, use ml_nnmodel_set_optimizer() to set the optimizer for the model.

3. init() from neuralnet has been updated to loadFromConfig() and does not initialize the model anymore.
Rather call init() after loadFromConfig() to initialize.
This also allows updating the model config after loading model with loadFromConfig().

4. init(optimizer, args_list) has been replaced with init()
Rather call setOptimizer(optimizer) to set the optimizer and
setProperty(args_list) to set the properties before calling init().

5. Bug fixes in checkValidation()

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
15 files changed:
Applications/Classification/jni/main.cpp
Applications/Classification/jni/main_func.cpp
Applications/LogisticRegression/jni/main.cpp
Applications/ReinforcementLearning/DeepQ/jni/main.cpp
Applications/Tizen_CAPI/capi_file.c
Applications/Tizen_CAPI/capi_func.c
Applications/Tizen_CAPI/main.c
Applications/Training/jni/main.cpp
api/capi/include/nntrainer.h
api/capi/src/nntrainer.cpp
nntrainer/include/layer.h
nntrainer/include/neuralnet.h
nntrainer/src/neuralnet.cpp
test/tizen_capi/unittest_tizen_capi.cpp
test/unittest/unittest_nntrainer_internal.cpp