hyeonseok lee [Thu, 9 Sep 2021 06:15:49 +0000 (15:15 +0900)]
[pooling2d layer] Maintain pooling2d layer property with props
- All pooling2d layer property will be maintain with props
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
hyeonseok lee [Wed, 8 Sep 2021 03:46:07 +0000 (12:46 +0900)]
[preprocess flip layer] Maintain layer property with props
- All the preprocess flip layer property will be maintain with props
- Remove default flip direction value which was horizontal_and_vertical
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
hyeonseok lee [Tue, 7 Sep 2021 06:32:11 +0000 (15:32 +0900)]
[conv layer] Maintain conv layer property with props
- All the conv layer property will be maintain with props
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
hyeonseok lee [Tue, 7 Sep 2021 03:43:08 +0000 (12:43 +0900)]
[preprocess translate layer] Maintain layer property with props
- All the preprocess translate layer property will be maintain with props
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
hyeonseok lee [Mon, 6 Sep 2021 08:26:53 +0000 (17:26 +0900)]
[split layer] Maintain split layer property with props
- All the property of split layer will be maintain with props
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
hyeonseok lee [Mon, 6 Sep 2021 08:13:01 +0000 (17:13 +0900)]
[embedding layer] Maintain embedding layer property with props
- All the property of embedding layer will be maintain with props
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
hyeonseok lee [Mon, 6 Sep 2021 05:20:14 +0000 (14:20 +0900)]
[input layer] Maintain input layer property with props
- All the property of input layer will be maintain with props
- Remove unused setProperty function of tflite_layer
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
Jihoon Lee [Wed, 8 Sep 2021 10:49:54 +0000 (19:49 +0900)]
[Test] Add save load test
Add save load test while adding options to model 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>
Jihoon Lee [Tue, 7 Sep 2021 12:14:57 +0000 (21:14 +0900)]
[ini] Implement dataset save/loader
This patch implements dataset saver/loader.
This patch propose sections "train_set", "valid_set", "test_set". Just
like optimizer.
**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, 7 Sep 2021 09:51:14 +0000 (18:51 +0900)]
[Props] Implement activation property
This patch implements activation property by enum
**Additional changes**
- TimeDistribute property is now handled at finalize()
**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, 9 Sep 2021 04:14:05 +0000 (13:14 +0900)]
[Bug] Fix support inplace for distribute Layer
This patch fixes support inplace for distirbute layer
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Cc: Parichay Kapoor <pk.kapoor@samsung.com>
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Wed, 8 Sep 2021 11:14:43 +0000 (20:14 +0900)]
[bnlayer] Batch norm layer bug fix
This patch provides bug fix to the initialization of the batch norm
values.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 8 Sep 2021 11:06:53 +0000 (20:06 +0900)]
[neuralnet] Fix validation reporting
Fix validation values reporting.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 8 Sep 2021 04:47:46 +0000 (13:47 +0900)]
[resnet] Fix data loader for resnet application
This patch fixes the data loader for resnet application after the
dataset loader has been changed to load data element by element than the
whole batch.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 8 Sep 2021 04:47:17 +0000 (13:47 +0900)]
[batchnorm] Bug fix for batch norm layer
Bug fix for requested variable for batch norm layer.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Tue, 7 Sep 2021 06:21:39 +0000 (15:21 +0900)]
[props] Support enum properties
This patch aims to support enum based properties, please refer to the
test to see how it works.
**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, 7 Sep 2021 03:54:26 +0000 (12:54 +0900)]
[Ini Save] input shape property
This patch includes input shape property generation
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Mon, 6 Sep 2021 08:49:02 +0000 (17:49 +0900)]
[LayerNode] Change context to be RAII
This patch refactors context to be RAII to make layer node properties
dumb.
**Changes**
- init context is removed
- layer node instead created and returned from layerNode::finalize(input_dims)
- remove dependency to input dimension before initialize
- layerNode now has input_shapes instead of setting directly from initContext
- runcontext is used to query things
- fix multiple bugs regarding the validity of layer node
- networkGraph::updateRunContext() -> finalizeContext() now
finalizes inside this function for brevity
- layerNode::updateRunContext() -> configureContext() to make it RAIIer.
- minor code cleans in networkGraph::initialize
**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, 7 Sep 2021 12:26:05 +0000 (21:26 +0900)]
[model] implement save best acc logic
This patch implements saving best accuracy when 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 [Mon, 6 Sep 2021 06:27:16 +0000 (15:27 +0900)]
[ini] Implement input layers property
This patch implements input layers property while decoupling input
dimensions from input layers as much as possible
to make the property dumb.
**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 [Wed, 1 Sep 2021 06:24:15 +0000 (15:24 +0900)]
[ini/save] Save Optimizer Section
This patch saves optimizer section to ini.
**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 [Wed, 1 Sep 2021 06:11:34 +0000 (15:11 +0900)]
[Optimizer] Refactor to use props
This patch refactors optimizer families to use properties while removing
some unused functions and constructors
**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 [Wed, 1 Sep 2021 04:27:39 +0000 (13:27 +0900)]
[IniWrapper] Add factory method
This patch adds a function to create ini section directly from
exportable which implements .exportTo to reduce overlapping codes
**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, 6 Sep 2021 13:24:50 +0000 (22:24 +0900)]
[Trivial] Fix gcc warning (sign compare)
This patch fixes gcc warning of sign compare from tests
**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 [Sat, 28 Aug 2021 05:41:38 +0000 (14:41 +0900)]
[ini] Implement model save
This patch implements model section save in ini format
**Side Changes proposed in this PR:**
- Move `THROW_STATUS` and `RETURN_STATUS` to util_func.h
**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 [Sat, 28 Aug 2021 04:52:32 +0000 (13:52 +0900)]
[ini] Migrate to properties for model
This patch migrate to properties for neuralnet
**Semantic Changes**
- NeuralNetwork::batch_size does not change when actual batchsize change
from neuralnetwork instead, model graph keeps batch size separately.
**Changes proposed in this PR:**
- Move members to props in model
- Move inline declaration to declaration for some functions
- Remove unused member/functions from parse_util / neuralnet
**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 [Sat, 28 Aug 2021 03:15:37 +0000 (12:15 +0900)]
[ini] Prepare model properties
This patch prepare model properties in `model_common_properties`
**Additional Changes proposed in this PR:**
- Add PositiveIntegerProperty base class
- Fix copy assignment/ctor in base_properties
**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 [Sat, 28 Aug 2021 09:19:32 +0000 (18:19 +0900)]
[NeuralNet] Fix testset run
This patch fixes testset running while cleaning up the code to reuse
repeating logics with callback
**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, 11 Aug 2021 05:55:21 +0000 (14:55 +0900)]
[test/planner] Unittests for memory planner
This patch adds unittests for the memory planner.
The unittests covers some of the extreme scenarios for memory planning
and ensures that the constraints are satisfied.
Note that these tests do not test the efficient of the planning but the
validity of the planned layout.
Corresponding bug fixes are also added.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 11 Aug 2021 01:34:26 +0000 (10:34 +0900)]
[planner] Support basic memory planner
This patch adds support for the basic memory planner.
The basic memory planner does not provide any memory sharing, and
results in all tensors being allocated in separate memories.
This forms the baseline for memory allocation.
Other memory planners will be enhancement over this.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Wed, 1 Sep 2021 04:46:59 +0000 (13:46 +0900)]
[Trivial] delete no meaningful save/load test
This patch delete no menaingful save/load test which was drawing
attention of static anaysis tool
**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 [Fri, 27 Aug 2021 11:44:57 +0000 (20:44 +0900)]
[CAPI] Implement model save load
this patch implements model save load 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>
Jihoon Lee [Fri, 27 Aug 2021 10:39:45 +0000 (19:39 +0900)]
[Dataset] Reflect final reviews
**Changes proposed in this PR:**
- rename request* / requestSlots()
- change raw_file_data_producer
**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 [Fri, 20 Aug 2021 10:03:08 +0000 (19:03 +0900)]
[Cleanup] Cleanup unused parts from datasets
**Changes proposed in this PR:**
- batch_queue.[h|cpp] -> iteration_queue.[h|cpp]
- delete Class BatchcQueue
- delete Producer::finalize, Producer::size,
databuffer::startFetchWorker, databuffer::fetch and following patch
- delete DataProducer::Iteration, DataProducer::Sample as we have
dedicated classes instead.
- remove *_sample suffix. (eg) DataProducer::finalize_sample becomes
DataProducer::finalize)
**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 [Fri, 20 Aug 2021 09:14:54 +0000 (18:14 +0900)]
[Dataset] Change and apply callback handler
This patch change and apply callback handler from batchwise ->
samplewise
**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 [Fri, 20 Aug 2021 06:04:40 +0000 (15:04 +0900)]
[Dataset] DataBuffer Handling
This patch adds DataBuffer handling in case of the producer throws.
**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, 19 Aug 2021 12:02:53 +0000 (21:02 +0900)]
[dataset] Migrate file to dataset sample
This patch apply new dataset to file producer.
There was a test number changes.
reason:
1. Now, partial batch drop is determinisitic
2. Reshuffling is now called after partial batch is filled, (previously
it was before partial batch is filled)
Verified numbers without shuffling with
https://github.com/nnstreamer/nntrainer/pull/1416/files#r685695542
**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, 19 Aug 2021 04:58:46 +0000 (13:58 +0900)]
[Dataset] Implement databuffer getter
This patch implements databuffer getter and corresponding tests
**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 [Wed, 18 Aug 2021 12:50:56 +0000 (21:50 +0900)]
[Dataset] Handle queue edge cases
Handle queue edge cases where ScopedView runs into an exception
**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 [Wed, 18 Aug 2021 05:21:23 +0000 (14:21 +0900)]
[itq] Add multiple mt itq test
This patch adds multiple test based on scenarios
**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 [Wed, 18 Aug 2021 05:20:40 +0000 (14:20 +0900)]
[Dataset] Add mt support to iteration Queue
This path adds async support to iteration queue and ending mechanism
**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 [Wed, 18 Aug 2021 05:08:12 +0000 (14:08 +0900)]
[Dataset] Allow iteration to have partial batch
This patch updates the semantics of batch to have distance between
endsample iteration and beginsample iterator to emplace partial batch
semantics.
**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, 26 Aug 2021 08:24:20 +0000 (17:24 +0900)]
[Ini] change setProperty signature of model
This patch changes setProperty signautre of model to return void instead
of int
**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, 24 Aug 2021 12:48:53 +0000 (21:48 +0900)]
[Save] Prepare to save ini
This patch adds a skeleton to save into ini format
**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, 24 Aug 2021 10:47:37 +0000 (19:47 +0900)]
[CAPI] Add permission denied return
This patch add permission denied return when failed to read/write to a
file.
**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, 24 Aug 2021 08:05:10 +0000 (17:05 +0900)]
[CCAPI] Implement basic load save
This patch adds basic load save from CCAPI.
**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>
hyeonseok lee [Thu, 26 Aug 2021 06:14:38 +0000 (15:14 +0900)]
[layer_node] handle deprecated property
- Handle deprecated property num_inputs, weight_initialize, bias_initialize
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
Jihoon Lee [Thu, 12 Aug 2021 11:58:36 +0000 (20:58 +0900)]
[Dataset] Add iteration queue tests
**Changes proposed in this PR:**
- Add iteration queue tests within sync (async will be followed)
- Add `slots` and `batch` query method to batch_queue
- Fix some trivial issues like uninitialized variables
**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>
hyeonseok lee [Thu, 26 Aug 2021 07:25:37 +0000 (16:25 +0900)]
[raw_file_data_producer] handle divide by zero
- Check sample_size to avoid divide by zero
Self evaluation:
Build test: [X]Passed [ ]Failed [ ]Skipped
Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
Jihoon Lee [Thu, 12 Aug 2021 09:11:54 +0000 (18:11 +0900)]
[Dataset] Change generator_sample signature
This patch changes generator sample signature from std::vector<Tensor *>
to std::vector<Tensor>
**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, 23 Aug 2021 08:31:45 +0000 (17:31 +0900)]
[CAPI] Add enum for ini saving
This patch adds enum for ini save and load.
**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, 12 Aug 2021 07:35:24 +0000 (16:35 +0900)]
[Dataset] Prepare q for the samplewise iteration
This patch prepares queue (`IterationQueue` to avoid naming conflict)
for the samplewise data feeding.
**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 [Wed, 11 Aug 2021 07:38:27 +0000 (16:38 +0900)]
[Dataset] Add Iteration Object
This patch adds a Iteration class and Sample class which allocate a tensor memory.
This object will be used in the queue.
**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 [Wed, 18 Aug 2021 09:18:22 +0000 (18:18 +0900)]
[CAPI] Expose l2norm layer
**Changes proposed in this PR:**
- Change name of l2norm layer to PreprocessL2Norm Layer
- Move l2norm layer to the main code base
**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, 24 Aug 2021 07:31:52 +0000 (16:31 +0900)]
[tensor_filter] Fix tensorfilter fail
This patch fixes tensor filter fail due to two critical bugs
- readModel was broken
- tensor getSharedDataTensor was broken
**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>
hyeonseok lee [Wed, 25 Aug 2021 07:12:32 +0000 (16:12 +0900)]
[layer_node] bugfix/validate init_context
- Validate init_context before using the init_context in print function
- Reorder adding default layer object to appcontext based on LayerType enum
- Correct typo
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
Jihoon Lee [Wed, 11 Aug 2021 05:40:14 +0000 (14:40 +0900)]
[Dataset] Change finalize signature
This patch changes finalize signature to contain user_data,
user_data will be needed to replicate the current worker(with diffrent
arguments) in case of
MT_safty is not provided by the producer. Please note that this does not
change any current behavior but the preparation for the future
enhancements.
**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, 10 Aug 2021 10:56:15 +0000 (19:56 +0900)]
[Dataset] Rework func dataset to samplewise
**Changes proposed in this PR:**
- Fix bugs in Tensor::Map
- Add shortcut for the Tensor::updateBatch
- Add func_data_producer with sample
**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, 23 Aug 2021 06:02:25 +0000 (15:02 +0900)]
[unittest] backbone property name update
Update backbone property name for the layers unittests.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Wed, 18 Aug 2021 08:35:34 +0000 (17:35 +0900)]
[CAPI] Open centroid KNN
**Changes proposed in this PR:**
- Move centroid KNN to layer, delete centroid knn from the Application
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Parichay Kapoor [Tue, 10 Aug 2021 12:59:40 +0000 (21:59 +0900)]
[memorypool] Introducing memory pool
This patch introduces memory pool for tensors. All the tensors requiring
memory can ask memory pool for their memory. The memory pool collects
all the requirements, uses the provided memory planner to plan a memory
layout, allocates the required memory, and then finally returns the
allocated memory to the requesters.
There are certain limitations to this memory pool:
1. All the memory must be requested before layout planning and
allocation.
2. There is no support for freeing selectively allocated tensors
3. In order to request support for more tensors and their memories,
all previously allocated memory has to be freed.
4. MemoryPool for now allocates all its required memory in a single
block. Support for breaking the required memory into smaller blocks is
left a TODO for later (this can be useful for devices without IOMMU).
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 10 Aug 2021 12:57:56 +0000 (21:57 +0900)]
[memoryplanner] Introducing memory planner
This patch introduces memory planner interface which will provide a
layout plan given the various memories required by the model.
Different memory allocations plans/strategies will be implemented by
extending this class with the given interface.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 10 Aug 2021 10:57:47 +0000 (19:57 +0900)]
[manager] Weight/gradient allocation simplify
Simplify weight and gradient allocation out to the most basic strategy
so that the memory optimization can be applied on it.
With this patch, the memory for gradient is not shared anymore till the
memory optimization is implemented.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Tue, 10 Aug 2021 05:46:18 +0000 (14:46 +0900)]
[Dataset] Implement samplewise for file
**Changes proposed in this PR:**
- implements samplewise size(), finalize() for file
- add corresponding 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>
Jihoon Lee [Thu, 19 Aug 2021 08:43:55 +0000 (17:43 +0900)]
[CAPI] Update description of ml_train_datagen_cb
This patch updates ml_train_datagen_cb with newly added api sets and
clarify the parameter @a last means.
**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, 19 Aug 2021 02:28:44 +0000 (11:28 +0900)]
[CAPI] Reflect feature review
This patch reflects feature review.
**Changes Proposed**
- Adding Not Supported enum
**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 [Wed, 18 Aug 2021 07:32:26 +0000 (16:32 +0900)]
[Backbone/CAPI] Implement backbone layer creation
**Changes proposed in this PR:**
- Connect enum to nnstreamer backbone
- Change `model_file` property to `model_path` for generality
- Add handling for when model_file property is loaded from interpretation
Resolves #1072
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Jihoon Lee [Mon, 9 Aug 2021 10:05:14 +0000 (19:05 +0900)]
[Dataset] Implement samplewise producer for random
This patch implements samplewise producer for random and its
corresponding test abstraction
**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, 19 Aug 2021 02:24:11 +0000 (11:24 +0900)]
[Trivial] layer client test was not running
This patch changes test variable argument in order for layer client
tests to run
**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, 10 Aug 2021 10:21:27 +0000 (19:21 +0900)]
[context/graph] Catch lifespan + 3-way execution order
This patch adds the setup to catch lifespan set by the layer developer
when requesting for tensors.
Further, the execution order now consists of 3 values - fowarding,
calcGradient and calcDerivative. The memory optimization will now be
done using the 3 functions to be called in order.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 11:03:04 +0000 (20:03 +0900)]
[manager] Set the default usage timestamp for tensors
Set default usage time index for all the tensors based on when the layer
is to be run in the sorted list.
The usage time indexes are stored in each GraphNode by the GraphCore.
When creating the sorted list, each layer is updated to store its
order location/index when executed in this sequence for forwarding as
well as backwarding.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 10:37:27 +0000 (19:37 +0900)]
[layers] Make requested weight/tensor names unique
Update the layers to make the requested weights and tensors names to be
unique. This done using the layer name with the postfix of the
weights/tensors name making the combination unqiue as layer name is
unique.
InitLayerContext is updated to provide access to the layer name while
finalizing the layer.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 05:08:31 +0000 (14:08 +0900)]
[graph/neuralnet] Move manager from neuralnet to netgraph
Move manager from NeuralNetwork class to NetworkGraph class.
Some corresponding minor adjustments are also added.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Mon, 9 Aug 2021 08:09:50 +0000 (17:09 +0900)]
[Dataset] Add interface for samplewise producer
This patch adds interface to migrate batchwise producer to samplewise
producer
**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, 15 Jul 2021 10:14:22 +0000 (19:14 +0900)]
[Dataset] Add user_data set Property handler
**Changes proposed in this PR:**
- PtrType properties
- Add user_data set property handler for backward competibility
**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 [Fri, 6 Aug 2021 08:33:13 +0000 (17:33 +0900)]
[CAPI] Reflect privilege reviews
This patch update document to add privilege to `ml_train_model_save()`
and `ml_train_model_load()`
**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>
hyeonseok lee [Tue, 17 Aug 2021 11:20:51 +0000 (20:20 +0900)]
[fix] ahub issues
- Added try catch statement
- Check value to avoid divide by zero
- Added const keyword to match override function
- Initialize member variable in constructor
Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 05:08:31 +0000 (14:08 +0900)]
[graph/neuralnet] Move manager from neuralnet to netgraph
Move manager from NeuralNetwork class to NetworkGraph class.
Some corresponding minor adjustments are also added.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 03:54:13 +0000 (12:54 +0900)]
[graph] Update check for input node
Update the check for checking if a given node is input node.
The check uses in-degree for the node to be 0.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 03:46:41 +0000 (12:46 +0900)]
[graphnode] Remove index from graph node
Currently each graph node has two identifiers - name and idx - where
both were unique. This patch removes the idx as the indentifier.
The corresponding functions are also removed.
In order to support fast fetching of nodes, graphcore has a map nodes.
This change revealed a bug with the names in the code. As ini does not
allow case sensitive names, the names from the ini are changed to lower
case. However, input_layers property names were allowed to be
case-sensitive. Further names set by the API were also case sensitive.
This patch forces all such names to be case-insensitive to lowercase.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Wed, 4 Aug 2021 02:07:31 +0000 (11:07 +0900)]
[graph] Remove layerv1 initialize code
Remove layerv2 initialize code for network graph.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Fri, 13 Aug 2021 02:37:58 +0000 (11:37 +0900)]
[CAPI] Assign values to the enum
This patch assigns values to enums in nntrainer-api-common.h
**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 [Fri, 6 Aug 2021 08:33:13 +0000 (17:33 +0900)]
[CAPI] Update regarding the review script
This patch updates nntrainer.h header with regard to the review script
- @a -> @c
- merge conflict with usage / mode
**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, 15 Jul 2021 07:50:58 +0000 (16:50 +0900)]
[Trivial] dataset usage enum rename
This patch renames enumeration as discussed ahead of time
**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 [Fri, 6 Aug 2021 08:54:48 +0000 (17:54 +0900)]
[CAPI] Add permission denied return value
As privilege is sometimes needed by dataset, add permission denied for
`ml_train_dataset_add_file()` and `ml_train_model_construct()`
**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 [Fri, 6 Aug 2021 07:43:49 +0000 (16:43 +0900)]
[CAPI] Change privilege to remark
This patch change privilege to remark as recommended
**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, 5 Aug 2021 03:55:33 +0000 (12:55 +0900)]
[CAPI] Add privilege to documentation
This patch adds privilege to documentation as guided
**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, 3 Aug 2021 04:36:56 +0000 (13:36 +0900)]
[CAPI/ACR] Fix typo and doxygen tag
This patch reflects review from #1371, #1446
**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, 3 Aug 2021 04:14:01 +0000 (13:14 +0900)]
[Trivial] Reflect acr review script
This patch reflect acr review scripts, which contains some trivial fixes
like adding a period at the end.
**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, 3 Aug 2021 03:33:51 +0000 (12:33 +0900)]
[CAPI/ACR] Add remark on tensor info getter
This patch adds remark on tensor info getter that info should not be
destroyed when fail to create
**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, 12 Aug 2021 08:19:50 +0000 (17:19 +0900)]
[fixes] Add bug fixes from asan
**Changes proposed in this PR:**
- Fix issues from address sanitizer
- Enable deprecated-declaration warning but disable for some files
**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 [Thu, 12 Aug 2021 06:44:25 +0000 (15:44 +0900)]
[fixes] Add bug fixes found with address sanitizer
This patch adds bug fixes after adding fixes related to address
sanitzer:
- NNStreamerLayer wasnt freeing resources upon destruction
- accessing released model handle in capi unittest
- not releasing model handle before end of unittest
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Jihoon Lee [Wed, 14 Jul 2021 16:42:49 +0000 (01:42 +0900)]
[Dataset] Remove unused part from refactoring
This patch removes parts that are no longer used from the refactoring
**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 [Wed, 14 Jul 2021 15:43:32 +0000 (00:43 +0900)]
[Dataset] Adopt new datagetter to databuffer
**Changes Propsed in this PR**
1. Adopt new data getter to neuralnet / factory
2. Fix: bugs found in raw_file_data_producer
3. Fix: databuffer not feeding last iteration when error
**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, 10 Aug 2021 01:29:31 +0000 (10:29 +0900)]
[tensor/test] Unittests for tensor allocate and initialize
Add unittests for tensor allocation and initialize the tensor memory in
various scenarios.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 27 Jul 2021 08:08:46 +0000 (17:08 +0900)]
[layer] Add support for initializer in requestTensor
This patch adds support for initializer in the requestTensor interface
of the layer context.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 27 Jul 2021 06:47:48 +0000 (15:47 +0900)]
[weight] Weight cleanup related to initializer
This patch provides weight cleanup related to the initializer.
Weights dont take care of the initializer but rather let var_grad handle
it which in turn let tensor handle it.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 27 Jul 2021 06:36:23 +0000 (15:36 +0900)]
[var_grad] Support initializer for var_grad
Support initializer for variables and gradient in var_grad with the
initializer of the tensor. This allows initialization to be done for
requested tensors as well, which will be updated in a later commit.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 27 Jul 2021 06:09:32 +0000 (15:09 +0900)]
[Tensor] Support initializer with tensor
Support initializer with tensor object natively.
Initialization will be done when the memory is allocated or can be
invoked manually as well.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 27 Jul 2021 05:38:10 +0000 (14:38 +0900)]
[tensor] WeightInitializer refactor to Tensor::Initializer
Rename/cleanup tensor functions to adhere with STL like function names.
Further, weight initializer has officially become tensor initializer.
The usage will be updated soon.
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>