Jihoon Lee [Mon, 14 Sep 2020 07:49:29 +0000 (16:49 +0900)]
Add gitignore for python generated files
**Changes proposed in this PR:**
- Add python generated extensions to gitignore
**Self evaluation:**
1. Build test: [ ]Passed [ ]Failed [x]Skipped
2. Run test: [ ]Passed [ ]Failed [x]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Tue, 15 Sep 2020 05:53:31 +0000 (14:53 +0900)]
[unittest] install unittest dependent files
Install missing unittest dependent files when installing the unittest
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Wed, 16 Sep 2020 00:31:21 +0000 (09:31 +0900)]
[ Test ] enable unittest
This pr includes enabling unittest for gbs
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Tue, 15 Sep 2020 09:57:00 +0000 (18:57 +0900)]
[ Bug ] Fix Tensor Copy
we only copy if tensor len == 0
related issues : #539
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Mon, 14 Sep 2020 11:16:50 +0000 (20:16 +0900)]
[ APP ] Add VGG 16 Test Configuration for Cifar100
This PR includes configuration file (vgg.ini) for VGG 16 with bn layer
which is:
conv3_64 - conv3_64, max_pooling, conv3_128 - conv3_128, max_pooling,
conv3_256 - conv3_256 - conv3_256, max_pooling, conv3_512 - conv3_512
- conv3_512, max_pooling, conv3_512 - conv3_512 - conv3_512,
bn_layer, max_pooling, fc_4096, bn_layer, fc_4096, bn_layer, fc_100,
softmax
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Tue, 15 Sep 2020 04:27:30 +0000 (13:27 +0900)]
[nnstreamer-plugin] Support to run unittest of nnstreamer plugin
Added support to run unittest of nnstreamer plugin on tizen build on the CI server
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 10 Sep 2020 05:18:00 +0000 (14:18 +0900)]
[Applications] Refactor applications
Refactor applications
- Classification -> TransferLearning/CIFAR_classification
- Training -> TransferLearning/Draw_classification
- mnist -> MNIST
- Delete TIZEN_CAPI as it overlaps with the unittests without even checking the final accuracy
Correspondingly update meson and some README.md
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 7 Sep 2020 02:49:54 +0000 (11:49 +0900)]
[tensor] Update default constructor of tensor to not throw
The default constructor does no heap memory allocation (size is 0)
However it can still throw which isn't right
This patch updates the tensor default constructor to not throw because of heap allocation
to create less issues with static checkers which requires to add try catch around tensor declarations
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 11 Sep 2020 02:42:41 +0000 (11:42 +0900)]
[bn] bug fix for setting optimizer for bn layer
This patch provides bugfix for setting the optiimzer for bn layer
although the weight updates are called only for the trainable params,
the optimizer is initialized with all the weights which are not trainable
and have no gradients
This results in un-necessary memory allocation for them as well as
creates issues for #517
This patch adds a count for trainable_param_size and a getTrainableParams() for the layer
and instead of all params, only trainable params of the layer are passed to the optimizer
An alternate was for the optimizer to check gradient size and ignore the ones with 0 size
but thats over-engineering at this point.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Wed, 23 Sep 2020 06:29:36 +0000 (15:29 +0900)]
[ Release ] NNTrainer 0.1.1 Release
NNTrainer v0.1.1 is released
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Wed, 23 Sep 2020 06:27:03 +0000 (15:27 +0900)]
[dist/tizen] Package tensor filter properly
NNtrainer tensor filter was packaged with nntrainer which isnt right
Now nntrainer tensor filter is packaged separately and depends on nnstreamer and nntrainer both
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 23 Sep 2020 05:21:09 +0000 (14:21 +0900)]
[inference] Inference bug fix
Added inference bug fix to run the last activation layer when it has been merged in the loss layer
This is done by supporting forwarding(in) method for loss which was earlier not supported
We just have to be careful for this not be called in any other case other than inference
Later this will be changed to handled with train/eval mode (which I think @zhoonit will add for bn layer)
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Fri, 18 Sep 2020 02:17:48 +0000 (11:17 +0900)]
[TensorDim] Fix index checks
**Changes proposed in this PR:**
- Fix index validation to be appropriate
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
jijoong.moon [Wed, 16 Sep 2020 07:11:00 +0000 (16:11 +0900)]
[ LICENCE ] Fix license header
NNTrainer is not LGPL. It is Apache2.0 and fix accordingly.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: HyesuAhn <linim@naver.com>
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Tue, 15 Sep 2020 07:37:03 +0000 (16:37 +0900)]
[ Bug ] Free content of g_file_get_contents
Add free when return
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Fri, 11 Sep 2020 07:23:40 +0000 (16:23 +0900)]
[dataset] Support setting user_data for generator dataset
Support setting user_data for the dataset using generators
For now, there is only 1 user_data for all 3 train/valid/test dataset
The format for setting user_data is
"ml_train_dataset_set_property(dataset, "user_data", (void *) data, NULL)"
It is to be passed two consecutive arguments, and with list being terminated by NULL
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Fri, 11 Sep 2020 04:04:33 +0000 (13:04 +0900)]
[ NNSTREAMER ] Add nnstreamer filter for nntrainer
In this PR,
. NNStreamer filter subplugin is implemented.
. Test Cases for subplugin
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Mon, 7 Sep 2020 07:13:29 +0000 (16:13 +0900)]
[ Example ] Add Inference Mode & Example
This PR includes:
. Add Inferenece Mode
Add 'is_train' to identify mode.
: Default is training mode(true). If this is set false, then it is
inference mode. If it is inference mode, then data buffer is not
initialized.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Fri, 4 Sep 2020 07:58:23 +0000 (16:58 +0900)]
[Tensor] Add multiple axes support
This patch adds multiple axes support for sum and average.
which is esentially needed to build bn_layer
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
jijoong.moon [Thu, 10 Sep 2020 01:52:10 +0000 (10:52 +0900)]
[ DataBuffer ] Fix for conner cases.
When the buffer thread broadcasts "DATA_END" while main thread get the
data from buffer, the main thread return even if there are data in
data buffer.
This PR includes fix this situation.
releated issues #427
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Fri, 4 Sep 2020 00:45:33 +0000 (09:45 +0900)]
[ BLAS ] Move to use CUBLAS for gemm
Move CUBLAS gemm routine into blas_interface
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Tue, 8 Sep 2020 07:34:36 +0000 (16:34 +0900)]
[ DataBuffer ] Hot fix for data buffer
. Remove unnecessary lock
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Mon, 7 Sep 2020 10:48:02 +0000 (19:48 +0900)]
[ Coverity ] Fix Race Condition issue about databuffer
. Add Lock to set data ready flag.
. change order to set the condition
. Fix undeterministic behavior of databuffer
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Mon, 7 Sep 2020 08:29:22 +0000 (17:29 +0900)]
[ SVACE ] Fix minor issues caused by svace
**Changes proposed in this PR:**
- Fix recursive header inclusion
- Add additional destory, overlapping validation
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Mon, 7 Sep 2020 04:54:39 +0000 (13:54 +0900)]
Fix normalization for specific case
**Changes proposed in this PR:**
- Fix normalization when min == max
- Add regression test from tct
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Mon, 7 Sep 2020 07:02:55 +0000 (16:02 +0900)]
[Docs] Fix typo on classificaion
**Changes proposed in this PR:**
- Fix typo that hasn't been changed after ini spec change
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
jijoong.moon [Mon, 7 Sep 2020 02:48:51 +0000 (11:48 +0900)]
[ SVACE ] Using rand_r instead of rand
. Classification/jni/mani.cpp
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoongmoon [Thu, 20 Aug 2020 04:42:17 +0000 (13:42 +0900)]
[ Doc ] Add explains about Applications
Modify Document of Training Exmaple (Transfer Learning)
. Applications/Training/README.md
Signed-off-by: jijoongmoon <jijoong.moon@samsung.com>
jijoong.moon [Thu, 3 Sep 2020 06:57:06 +0000 (15:57 +0900)]
[ CONV2D ] Add explanation about how to calculate conv2d.
Add explanation about covn2d.
. forwarding
. Calculate DelK in backwarding
. Calculate return derivative in backwarding
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Thu, 3 Sep 2020 03:19:29 +0000 (12:19 +0900)]
[ BLAS ] Add more blas func to support and update tensor.cpp
. add sscal, snrm2, sgemv, scopy
. modify tensor.cpp to use blas_interface
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Thu, 3 Sep 2020 03:10:22 +0000 (12:10 +0900)]
Fix app test fail
Fix app classification capi func test fails with negative number
- Add destroy routine
- s/model_path/save_path/
Resolves #501
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Wed, 2 Sep 2020 07:35:40 +0000 (16:35 +0900)]
[unittest] Add verification of accuracy for training metrics
This patch add verification of accuracy for training metrics like loss and accuracy
in capi test cases
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoongmoon [Mon, 31 Aug 2020 11:51:17 +0000 (20:51 +0900)]
[ MNIST ] Add save weight initialization data
This PR includes codes to save weight initialized data for nntrainer
input. This can be read using NN.readModel() except optimizer read in
fully connected layer.
Signed-off-by: jijoongmoon <jijoong.moon@samsung.com>
jijoong.moon [Fri, 28 Aug 2020 01:55:36 +0000 (10:55 +0900)]
[ UTIL ] Add BLAS Interface
In order to handle blas easily, blas interface is added.
.blas_interface.cpp
.blas_interface.h
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Wed, 2 Sep 2020 02:04:42 +0000 (11:04 +0900)]
[CAPI] Fix potential issue in capi
**Changes proposed in this PR:**
- Change logic to feature check first for `ml_train_construct_with_conf`
- Add exception boundary to all make_shared
- Add noexcpt to layer::getName since error is not handled in capi
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Tue, 1 Sep 2020 02:37:39 +0000 (11:37 +0900)]
[dataset] check bufsize at init
This patch changes the initialization of buffer size.
The buffer size is now initialized with value 1 if user does not set it.
Then the proper checks on buffer size are performed at init
and buffer size is appropriately resized then.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Wed, 2 Sep 2020 03:20:22 +0000 (12:20 +0900)]
[ TOKEN ] Update weight decay to weight regularizer
Change Weight_Decay to Weight_Regularizer
Change Weight_Decay_Lambda to Weight_Regularizer_Constant
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Fri, 28 Aug 2020 10:15:09 +0000 (19:15 +0900)]
[ UNITTEST ] Integer Unit test for conv2d
This PR inlucdes Integet Unit Test for conv2d to evaluted accuracy.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Tue, 1 Sep 2020 07:46:25 +0000 (16:46 +0900)]
Fix ahub reporting buffer overflow
**Changes proposed in this PR:**
- Add extra safeguard to sum
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Tue, 1 Sep 2020 06:26:50 +0000 (15:26 +0900)]
[tensor] bug fix for the sum
add bug fix for the sum of tensors
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 1 Sep 2020 03:41:01 +0000 (12:41 +0900)]
[tensor] Add unittests for tensor dot
Add unittests for tensor dot
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 26 Aug 2020 13:56:49 +0000 (22:56 +0900)]
[dot] Update tensor dot implementation
Update the implementation of tensor dot product
This update applies dot on the last dimesnion of input and second last dimension of passed tensor `m`
This allows use of dot in fc layer directly eliminating calling transpose explicitly but rather use transpose in blas
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 28 Aug 2020 06:09:06 +0000 (15:09 +0900)]
[loadconfig] Load model and dataset in config at start
Load model and dataset in config at start so that any dependencies
which model, dataset and layer have among them can be easily solved
Resolves #389
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Wed, 26 Aug 2020 02:08:25 +0000 (11:08 +0900)]
[ Conv2D ] add cblas_sgemm to calculate conv2d
This PR includes conv2d layer gradient calculation using cblas_gemm.
In order to do this, new functions are introduced.
. conv2d_gemm
. im2col
related issue : #477
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Fri, 28 Aug 2020 04:14:47 +0000 (13:14 +0900)]
[unittest] Make unittest data close to int
Make unittest data close to int
This allows matching outputs with lower tolerance and higher precision
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 28 Aug 2020 05:32:03 +0000 (14:32 +0900)]
[Pooling] Bug fix for pooling global max
Bug fix for pooling global max
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 3 Aug 2020 10:24:08 +0000 (19:24 +0900)]
[Layer] Add support for element-wise add layer
Add support for element-wise add layer along with basic unittests
This will form the base layer for supporting skip connections
V2:
Element-wise add layer -> Addition Layer
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 28 Aug 2020 01:48:14 +0000 (10:48 +0900)]
[tizen/dist] Update tizen packaging
Updated tizen packing spec file
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 26 Aug 2020 08:41:01 +0000 (17:41 +0900)]
[tensor] Update tensor operations to use cblas
Update tensor operations to use cblas
Further, update various operations to use stl functions than implement locally
Bug fix on sum_by_batch which calculated sum of absolute values earlier
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 26 Aug 2020 10:18:34 +0000 (19:18 +0900)]
[softmax] Update softmax implementation
Update softmax implementation to use tensor operations than running manual loops
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 27 Aug 2020 08:20:32 +0000 (17:20 +0900)]
[neuralnet] Update model_file to save_path in neuralnet properties
Update model_file to save_path in neuralnet properties
Resolves #488
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 26 Aug 2020 10:23:41 +0000 (19:23 +0900)]
[tensor] Update tensor apply
Update tensor apply to use std::transform than a simple loop
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 26 Aug 2020 04:49:14 +0000 (13:49 +0900)]
[Tensor] out-of-place to in-place call uniformly
Out-of-place operations call in-place operations with different clones and checks everywhere
Make a common abstraction to do this and use it for cleaner and readable code.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Tue, 25 Aug 2020 07:54:49 +0000 (16:54 +0900)]
[tcm] Add config.yaml
Add config.yaml for tcm
**Self evaluation:**
1. Build test: [ ]Passed [ ]Failed [X]Skipped
2. Run test: [ ]Passed [ ]Failed [X]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Fri, 21 Aug 2020 03:19:48 +0000 (12:19 +0900)]
[tf match] Verified with 1x1 conv
Verified with 1x1 conv but 2x2 conv (2nd conv) creates the issues
This commit helps in reproduction
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 20 Aug 2020 05:39:09 +0000 (14:39 +0900)]
[mnist] Update tensorflow training for mnist application
Update tensorflow training example for mnist application
This with same initialization as nntrainer (shown with zero initialization)
matches the final accuracy as well as loss with nntrainer
See also #133
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 25 Aug 2020 07:51:57 +0000 (16:51 +0900)]
[Example] Minor bugfix
Added minor bugfix to application ini file
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Tue, 25 Aug 2020 08:45:28 +0000 (17:45 +0900)]
Fix typo in capi-nntrainer spec
**Changes proposed in this PR:**
- Fix typo capi-nntrainer that are causing unexpected exit
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Tue, 25 Aug 2020 05:45:15 +0000 (14:45 +0900)]
[Example] Update docs
**Changes proposed in this PR:**
- Update docs
- Add demo footage
- Delete batch from model input shape
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Tue, 25 Aug 2020 07:44:46 +0000 (16:44 +0900)]
[Example] Add missing model file
Add missing model file that are excluded from .gitignore by force
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Mon, 24 Aug 2020 10:22:51 +0000 (19:22 +0900)]
[TCM] Fix no assertion test
This patch fixes no test that has no assertion
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Mon, 24 Aug 2020 10:37:27 +0000 (19:37 +0900)]
[ Docs ] Add how to run test
**Changes proposed in this PR:**
- How to run unittest
- How to run sample app test
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
jijoongmoon [Fri, 21 Aug 2020 10:57:22 +0000 (19:57 +0900)]
[ Application ] change nntrainer_knn to knn_sample
Current implementation of KNN does not use nntrainer. However it is
still good transfer learning example using KNN.
Therefore, we change the execution file name from nntrainer_knn to
knn_sample.
main.cpp with NYI is added instead until we implement it with
nntrainer.
Issue #457
Signed-off-by: jijoongmoon <jijoong.moon@samsung.com>
jijoong.moon [Mon, 24 Aug 2020 01:50:33 +0000 (10:50 +0900)]
[ Coverity ] Fix coverity issues.
This PR inclues coverity issues fixes.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Mon, 24 Aug 2020 04:38:33 +0000 (13:38 +0900)]
[loss] Rename cost to loss
Rename cost to loss
See also #239
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 24 Aug 2020 02:48:06 +0000 (11:48 +0900)]
[ini] Update INI configuration
Update ini configuration with the below changes:
- filter -> filters (for convolution)
- pooling_size -> pool_size
- epoch -> epochs
- minibatch -> batch_size
See also #239
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 24 Aug 2020 02:09:47 +0000 (11:09 +0900)]
[init] Update weight initializations
Add proper bias initialization than just bias_init_zero
Update weight_ini to weight_initializer
Add zero initializer to the list of supported initiailizers
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 21 Aug 2020 06:45:13 +0000 (15:45 +0900)]
[INI] This patch refactors the INI naming for saving model file
This patch update the INI naming for saving the model file
from model to save_path
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 24 Aug 2020 05:29:58 +0000 (14:29 +0900)]
[license] Fix SPDX license usage
Fix SPDX license usage
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Mon, 24 Aug 2020 00:36:08 +0000 (09:36 +0900)]
[docs] Updated docs to github MD lint
Updated docs as per github MD lint
Also added minor fixes
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 21 Aug 2020 04:53:07 +0000 (13:53 +0900)]
[Tensor] Set param size cannot update size
Add the restriction of updating the param size for layer weights once set
As of now, this adds the restriction of changing filter size for convolution once set
But this needs to be fixes in convolution. Conv2D should just have 1 weights and bias,
not split by filter size
Resolves #293
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 21 Aug 2020 05:09:00 +0000 (14:09 +0900)]
[ini] Update Network section to Model
Update section name from Network to Model
Also update internal naming in loadModel and correspondingly unittests
Resolves #318
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 5 Aug 2020 10:31:30 +0000 (19:31 +0900)]
[config] Separate loading model with config from neuralnetwork class
Loading the model from given ini file is separated from main neuralnetwork class
This will allow loading from other type of config files and keep neuralnetwork class cleaner
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Thu, 20 Aug 2020 06:06:26 +0000 (15:06 +0900)]
[tensor] restriected setDim is now reshape
Tensor setDim() is renamed to reshape() as tensor should only be allowed to reshape
Resizing it invalidates the invariant for the other holders of the same data of tensor (see also #412)
This patch renames setDim() to reshape() which throws if there is an attempt to change size
Further getDim() now returns a copy of the dimension to disallow changing dimension of a tensor directly
Also some aliases in Tensor (like getWidth()) have been removed. Rather, width() like functions are kept
to maintain coherency with TensorDim() interface.
Resolves #412
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoongmoon [Wed, 19 Aug 2020 06:24:35 +0000 (15:24 +0900)]
[ Documents ] Add Documentation
. getting-started.md
. how-to-run-exampels.md
. how-to-use-testcases.md
. Applicatin/Classification/README.md
Signed-off-by: jijoongmoon <jijoong.moon@samsung.com>
Parichay Kapoor [Wed, 19 Aug 2020 06:48:50 +0000 (15:48 +0900)]
[neuralnet] Train loop index variable reuse remove
Multiple nested loop with same variable names are being used. Fix that.
Also, reporting for train epoch should start from 1 and not from 0.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Wed, 5 Aug 2020 05:19:22 +0000 (14:19 +0900)]
[ MNIST ] Comparison with Tensorflow
This PR includes:
. mnist tensorflow example to compare
. data generation for tensorflow
. input for mnist ini for small size training set
. fix no_op_prime for activation layer
. add sqrtDouble
. remove conv2d rotate_180
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Wed, 19 Aug 2020 04:25:05 +0000 (13:25 +0900)]
[layers] Make input and hidden consistent for layers
Set input and hidden consistent for all layers.
Resolves #420
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 19 Aug 2020 05:41:29 +0000 (14:41 +0900)]
[layers] Remove last layer property
Remove last layer property from all the layers as it is redundant
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 19 Aug 2020 04:06:28 +0000 (13:06 +0900)]
[bn_layer] Remove unused gradients
Remove ununsed gradients for mu and variance for the batch normalization layers to remove unnecessary memory usage.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Thu, 13 Aug 2020 02:34:26 +0000 (11:34 +0900)]
[Example] Add display result
**Changes proposed in this PR:**
- Run training asynchronsly
- Parse train result
- Change draw / result appearance
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
jijoong.moon [Thu, 13 Aug 2020 11:05:49 +0000 (20:05 +0900)]
[ Bug ] Fix calculating training loss
In this PR, calculation of training loss is fixed.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Tue, 18 Aug 2020 05:50:26 +0000 (14:50 +0900)]
[ Application ] fix model file path of classification example
Previously model path is fixed as "../../res/mobilenetv2.tflite"
In this PR, data_path is used for define path.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Parichay Kapoor [Tue, 18 Aug 2020 05:43:34 +0000 (14:43 +0900)]
[capi] Comply with Tizen ACR comments
This patch applies comments from the Tizen ACR
- Comments to have % as prefic
- remove ML_ERROR_CANNOT_ASSIGN_ADDRESS as it unknown and not used
- Remove `experiment API` statements
- 6.x -> 6.0
- Add groups in api-common.h
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Thu, 13 Aug 2020 07:35:04 +0000 (16:35 +0900)]
[TCM] Add few negative cases
**Changes proposed in this PR:**
- Add losslayer / util negative cases
- Change ASSERT_EXCEPTION -> EXPECT_THROW
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
jijoong.moon [Wed, 12 Aug 2020 13:03:40 +0000 (22:03 +0900)]
[ SAVCE ] Fix svace issues
This PR includes fixes about SVACE issues
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Tue, 11 Aug 2020 06:20:03 +0000 (15:20 +0900)]
Additional validation and fixes for network::init
**Changes proposed in this PR:**
- Add term `realization`. This term denotes that enum type is turned
into an instantiation
- Change `initActivationLayer` -> `realizeActivationType`
- Change `initFlattenLayer` -> `relizeFlattenType`
- Delete `_make_act_layer`
- Add `TensorDim::isEmpty()`
- Clarify `checkValidation` -> `isInitializable` and move beforehand
validation logics
- Fix logic that prevents double activation
- Move layer name validaton phase `addLayer` -> `isInitializable`
- Prevent realization of `ACT_NONE`
- Sort unittest_modelfile order and update comments
- Enable few test cases
Resolves #390
See also #388
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Wed, 12 Aug 2020 10:04:42 +0000 (19:04 +0900)]
[CAPI] Add comments for tizen privileges
Add commnets for privileges which might be required in case of saving the model
to a file.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 7 Aug 2020 11:45:07 +0000 (20:45 +0900)]
[model] Change the semantics for setting the batchsize
Batchsize as a property was earlier set in input_shape for a layer
as well as for the model. However, this was conflicting and prone to errors.
This patch disables setting batch size while setting the input_shape.
If batch_size is more than 1 in the input_shape, a warning is issued.
And this value is later overriden by the batchsize set for the model.
This same batchsize is also used for the dataset as well.
Resolves #299
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 11 Aug 2020 08:20:05 +0000 (17:20 +0900)]
[softmax] Bug fix for softmax
Softmax should apply on 1 axis (last axis in this patch) than all the axis.
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 11 Aug 2020 08:18:05 +0000 (17:18 +0900)]
[softmax] Bug fix for softmax
Softmax indexing bug fix
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 5 Aug 2020 01:29:05 +0000 (10:29 +0900)]
[TensorDim] Change behaviour of default tensorDim constructor
Default tensor dim constructor sets up tensorDim of all 0 which are invalid to use by nature
Setting any dimension resets all the 0 dimensions to 1
This removes allocation of memory by tensor on default constructor yet allows using default constructor of tensor
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Mon, 10 Aug 2020 07:26:15 +0000 (16:26 +0900)]
Add atomicity to loadFromConfig
resolves #382
**Changes proposed in this PR:**
- Add swap for nerualNetwork
- Correct doxygen style for neuralnet members
- Add optimizer copy ctor
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Thu, 6 Aug 2020 07:53:05 +0000 (16:53 +0900)]
Add safeguard to prevent loadFromConf twice
**Changes proposed in this PR:**
- This patch disables loadFromConfig after loading
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Mon, 10 Aug 2020 05:19:44 +0000 (14:19 +0900)]
[capi] Add tizen feature checking
Added tizen feature checking for C-API
Added corresponding bypass for the tizen capi unittests
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
jijoong.moon [Mon, 10 Aug 2020 08:02:43 +0000 (17:02 +0900)]
[ Release ] Change version of nntrainer
Release Version 0.1.0.rc1
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Jihoon Lee [Thu, 6 Aug 2020 07:41:52 +0000 (16:41 +0900)]
[Example] Change user scenario
In this patch, user draws smile face and sad face respectively for 5
times.
It is splited half to trainset/validationSet and used for training.
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Tue, 4 Aug 2020 11:42:07 +0000 (20:42 +0900)]
[Tensor] Enable default copy constructor
This patch enables default copy constructor to fix #281.
- Added sharedConstTensor for safety
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Fri, 7 Aug 2020 08:09:41 +0000 (17:09 +0900)]
[api] Update since tizen version
Update since tizen version from 6.x to 6.0
See also #414
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 7 Aug 2020 08:06:28 +0000 (17:06 +0900)]
[api] Add note that this API is experimental
Added note that this API is experimental and not stable
to most of the functions for this to be visible in the SDK function descriptions
See Also #414
**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>