platform/core/ml/nnfw.git
5 years ago[moco/tf] Processing the schama file for model metainfo file (#4137)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 22:03:44 +0000 (07:03 +0900)]
[moco/tf] Processing the schama file for model metainfo file (#4137)

This commit adds schema file and CMakeLists for processing model metainfo file.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
5 years ago[moco/tf] Fix to use return in Conv2DCanonicalizer (#4142)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 09:36:48 +0000 (18:36 +0900)]
[moco/tf] Fix to use return in Conv2DCanonicalizer (#4142)

This will fix to use return value in Conv2DCanonicalizer

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Introduce ReLU6 (#4131)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Mon, 8 Jul 2019 09:36:23 +0000 (09:36 +0000)]
[moco/tf] Introduce ReLU6 (#4131)

* [moco/tf] Introduce ReLU6

This commit introduce ReLU6 operation to moco.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
* This commit apply for comments.

5 years ago[moco/tf] Reorder FeatureDecode-TensorBiasAdd (#4127)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 09:17:55 +0000 (18:17 +0900)]
[moco/tf] Reorder FeatureDecode-TensorBiasAdd (#4127)

"ReorderDecode" is now able to rewrite "FeatureDecode-TensorBiasAdd" as
"FeatureBiasAdd-FeatureDecode".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[locop] Introduce SymbolTable interface (#4128)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 08:23:50 +0000 (17:23 +0900)]
[locop] Introduce SymbolTable interface (#4128)

This commit introduces "SymbolTable" interface as a step to make
locop framework extensible.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[locop] Default-contructible NodeDesc (#4134)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 07:21:49 +0000 (16:21 +0900)]
[locop] Default-contructible NodeDesc (#4134)

This commit makes (internal) NodeDesc default-constructible.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[exo/tflite] Extract Shape Inference (#4138)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 07:21:11 +0000 (16:21 +0900)]
[exo/tflite] Extract Shape Inference (#4138)

This commit extracts shape inference phase from tensor export phase.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Introduce CanonicalizeConv2D (#4140)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 07:14:58 +0000 (16:14 +0900)]
[moco/tf] Introduce CanonicalizeConv2D (#4140)

* [moco/tf] Introduce CanonicalizeConv2D

This will introduce emptyCanonicalizeConv2D that transforms TensorFlow dialect Conv2D to Canonical Conv2D

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* rename and move folder

5 years ago[locoex/customop] Initial commit for Custom Op (#4136)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 07:10:50 +0000 (16:10 +0900)]
[locoex/customop] Initial commit for Custom Op (#4136)

* [locoex/customop] Initial commit for Custom Op

This is an initial commit for Custom Op. Parents for Custom Op will be added after successive PRs.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* revised

5 years ago[moco/tf] Introduce ResolveFusedBatchNorm (#4125)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 02:45:27 +0000 (11:45 +0900)]
[moco/tf] Introduce ResolveFusedBatchNorm (#4125)

This will introduce ResolveFusedBatchNorm transformation that decomposes FusedBatchNorm node into Add and Mul

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[exo.tflite] Extract Type Inference as a separate phase (#4126)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 01:50:37 +0000 (10:50 +0900)]
[exo.tflite] Extract Type Inference as a separate phase (#4126)

This commit extracts (Data) Type Inference from exportOpDefinedTensor
phase.

This chanage allows users to infer types without exporting tensors.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[plier/tf] Move more functions from Moco::tf::convert.h & cpp (#4122)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 01:11:39 +0000 (10:11 +0900)]
[plier/tf] Move more functions from Moco::tf::convert.h & cpp (#4122)

The following was moved into plier.tf from moco/../convert.h & cpp
- two functions
- test case

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
5 years ago[moco/tf] name attribute for transforms (#4121)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 01:06:31 +0000 (10:06 +0900)]
[moco/tf] name attribute for transforms (#4121)

This will add name() attribute for existing Transforms

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] simplify get_data_layout (#4124)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 00:55:21 +0000 (09:55 +0900)]
[moco/tf] simplify get_data_layout (#4124)

This will simplify get_data_layout to call as_DataLayout as common part

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoAdd "GoogleDoubleConversion" package (#4112)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 00:14:54 +0000 (09:14 +0900)]
Add "GoogleDoubleConversion" package (#4112)

* Add "GoogleDoubleConversion" package

This commit introduces "GoogleDoubleConversion" which allows users to
import system-wide Google DoubleConversion library in nncc style.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Remove tab

5 years ago[exo/tflite] Use loco::output_nodes in exportOpDefinedTensors (#4118)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 8 Jul 2019 00:14:32 +0000 (09:14 +0900)]
[exo/tflite] Use loco::output_nodes in exportOpDefinedTensors (#4118)

exportOpDefinedTensors currently uses its own implementation of
loco::output_nodes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco_tf] Fix BiasAdd test indent todo (#4120)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 00:11:36 +0000 (09:11 +0900)]
[moco_tf] Fix BiasAdd test indent todo (#4120)

This will fix indentation of BiasAdd test from previous change

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Conv2D test support TFConv2D (#4083)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 8 Jul 2019 00:08:21 +0000 (09:08 +0900)]
[moco/tf] Conv2D test support TFConv2D (#4083)

* [moco/tf] Conv2D test support TFConv2D

This will split Conv2D test to support TFConv2D by the knob

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* include knob

5 years ago[moco/tf] Rename FusedBatchNorm Graph builder (#4119)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Sun, 7 Jul 2019 23:29:51 +0000 (08:29 +0900)]
[moco/tf] Rename FusedBatchNorm Graph builder (#4119)

This will rename GraphBuilder for FusedBatchNorm with 'TF' prefix to match other GraphBuilders

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Add Canonicalization and Knob for TFBiasAdd (#4117)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 5 Jul 2019 08:49:35 +0000 (17:49 +0900)]
[moco/tf] Add Canonicalization and Knob for TFBiasAdd (#4117)

* [moco/tf] Add Canonicalization and Knob for TFBiasAdd

This will Add Canonicalization class with TFBiassAdd node.
Add a Knob for canonicalization of TFBiasAdd to Canonical BiasAdd node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* fix note

5 years ago[loco] Introduce FeatureBiasAdd node (#4110)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 08:47:43 +0000 (17:47 +0900)]
[loco] Introduce FeatureBiasAdd node (#4110)

This commit introduces FeatureBiasAdd which adds a "bias" along
a FeatureMap's depth axis.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Import as TFBiasAdd by Knob (#4116)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 5 Jul 2019 08:25:26 +0000 (17:25 +0900)]
[moco/tf] Import as TFBiasAdd by Knob (#4116)

This will add ImportAsTFBiasAdd knob and import as TFBiasAdd when turned on.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Move helper alias to TFNodeDecl header (#4115)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 5 Jul 2019 07:51:28 +0000 (16:51 +0900)]
[moco/tf] Move helper alias to TFNodeDecl header (#4115)

This will move helper alias from TFConv to TFNodeDecl header for common usage

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Introduce TFBiasAdd (#4114)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Fri, 5 Jul 2019 07:33:24 +0000 (16:33 +0900)]
[moco/tf] Introduce TFBiasAdd (#4114)

This will introduce TFBiasAdd to import BiasAdd node as-is

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[exo/tflite] Extract Type/Shape Context (#4107)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 05:24:38 +0000 (14:24 +0900)]
[exo/tflite] Extract Type/Shape Context (#4107)

SerializedModelData has multiple responsibilities as of now.

This commit extracts TypeContext (which manages node-to-type mapping)
and ShapeContext (which manages node-to-shape mapping) as the first step
to internal design revision.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoAdd TF_SMALL_NET_0006 test (#4103)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 04:08:10 +0000 (13:08 +0900)]
Add TF_SMALL_NET_0006 test (#4103)

* Add TF_SMALL_NET_0006 test

This test checkes what happens when "Concat" is in between two Feature operations.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Update comment

5 years ago[moco/tf] Set Graph Input/Output Data Type (#4104)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 04:07:59 +0000 (13:07 +0900)]
[moco/tf] Set Graph Input/Output Data Type (#4104)

From now on, moco::tf::Importer generates a loco graph with
valid Input/Output dtype values.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[tf2tflite] Refine how to add tests (#4105)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 04:07:49 +0000 (13:07 +0900)]
[tf2tflite] Refine how to add tests (#4105)

This commit refines tf2tflite test framework to use CMake's "include"
command instead of ListFile_Read function.

This change permits flexible test management. For example, now it is
possible to comment out some tests temporarily.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Introduce TensorBiasAdd alias (#4102)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 01:15:41 +0000 (10:15 +0900)]
[loco] Introduce TensorBiasAdd alias (#4102)

This change allows users to use a bit short "loco::TensorBiasAdd" instead
of "loco::BiasAdd<loco::Domain::Tensor>".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[mocotest/onnx] Generate test file only on change (#4106)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 5 Jul 2019 01:04:45 +0000 (10:04 +0900)]
[mocotest/onnx] Generate test file only on change (#4106)

The current implementation always copies and generates test files. With
this commit, test files are copied and generated only when it is
necessary.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[TFtest] Add TF_SMALL_NET_0004 test (#4095)
남궁석/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 4 Jul 2019 22:05:27 +0000 (07:05 +0900)]
[TFtest] Add TF_SMALL_NET_0004 test (#4095)

* [TFtest] Add TF_SMALL_NET_0004 test

This commit adds TF_SMALL_NET_0004 test which sequentially performs
DepthwiseConv2d - FusedBatchNorm

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
* unpack values

5 years ago[loco] Add DataType attribute to Graph Input/Output (#4097)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 10:27:03 +0000 (19:27 +0900)]
[loco] Add DataType attribute to Graph Input/Output (#4097)

This commit allows loco frontends to record the data type of graph-level
input/output in GraphInput/GraphOutput.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[locomotiv] Introduce ReLU6 operation to locomotiv (#4096)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 4 Jul 2019 10:11:46 +0000 (19:11 +0900)]
[locomotiv] Introduce ReLU6 operation to locomotiv (#4096)

This commit introduce ReLU6 operation to locomotiv.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
5 years ago[mocotest/tf] Copy files only on change (#4094)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 09:22:37 +0000 (18:22 +0900)]
[mocotest/tf] Copy files only on change (#4094)

moco testframework now copies (and generates) test files only on change.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[TFtest] Add TF_SMALL_NET_0003 test (#4093)
남궁석/On-Device Lab(SR)/Engineer/삼성전자 [Thu, 4 Jul 2019 07:45:55 +0000 (16:45 +0900)]
[TFtest] Add TF_SMALL_NET_0003 test (#4093)

This commit adds TF_SMALL_NET_0003 test which sequentially performs
Conv2d - FusedBatchNorm

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
5 years ago[mocotest/tf] Use shared testcases (#4091)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 07:31:04 +0000 (16:31 +0900)]
[mocotest/tf] Use shared testcases (#4091)

mocotest-tf now uses shared TensorFlow tests.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[tf2tflite] Use shared testcases (#4090)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 07:29:25 +0000 (16:29 +0900)]
[tf2tflite] Use shared testcases (#4090)

This commit rewrites tf2tflite test framework to use shared testcases
and removes tf2tflite-local testcases.

tf2tflite test framework now manages whitelist internally.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[mocotest-tf] test case for custom op (#4078)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 4 Jul 2019 04:49:14 +0000 (13:49 +0900)]
[mocotest-tf] test case for custom op (#4078)

* [mocotest-tf] test case for custom op

This is the first testcase for custom op. code for moco/loco extension will be written to pass this test.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* move into new resource dir

5 years ago[moco/tf] Implement ReorderDecode Transform (#4082)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 04:44:29 +0000 (13:44 +0900)]
[moco/tf] Implement ReorderDecode Transform (#4082)

* [moco/tf] Implement ReorderDecode Transform

This commit implements ReorderDecode transform which rewrites Decode ->
Op as Op -> Decode if possible.

The current implementation works only for ReLU.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Hoist loop-invariant code

* Update Graph example

5 years ago[angkor] Add TensorIndex & TensorShape alias (#4085)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 04:43:33 +0000 (13:43 +0900)]
[angkor] Add TensorIndex & TensorShape alias (#4085)

This commit introduces an alias of tensor::Index and tensor::Shape under
nncc::core::ADT namespace (to shorten client-side code).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[tf2tflite] Detect crashes during test (#4089)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 04:42:15 +0000 (13:42 +0900)]
[tf2tflite] Detect crashes during test (#4089)

* [tf2tflite] Detect crashes during test

The current test frameworks becomes green as long as i5diff succeeds,
and thus it cannot detect any crash in tf2tflite / nnkit-run.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Remove trap code

5 years ago[moco/tf] Introduce TFConv2D IR (#4068)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 4 Jul 2019 03:59:10 +0000 (12:59 +0900)]
[moco/tf] Introduce TFConv2D IR (#4068)

* [moco/tf] Introduce TFConv2D IR

This will introduce TFConv2D TensorFlow dialect for Conv2D and related changes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* use reference

* as type

5 years agoIntroduce ListFile CMake module (#4081)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 01:47:42 +0000 (10:47 +0900)]
Introduce ListFile CMake module (#4081)

This commit introduces ListFile CMake module which provides
ListFile_Read helper.

This helper makes it easy to create a list from text files.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoIntroduce TensorFlowTests resource (#4080)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 4 Jul 2019 01:36:56 +0000 (10:36 +0900)]
Introduce TensorFlowTests resource (#4080)

This commit introduces TensorFlowTests resource which includes all the
tests in moco-tf and tf2tflite.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Branch Conv2D graph builder for TFDialect (#4079)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 4 Jul 2019 01:29:52 +0000 (10:29 +0900)]
[moco/tf] Branch Conv2D graph builder for TFDialect (#4079)

* [moco/tf] Branch Conv2D graph builder for TFDialect

This will prepare Conv2D graph builder with a knob to generate TFConvD node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* use throw

5 years ago[moco_tf] tensor_shape setter in ShapeInferenceData (#4084)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Thu, 4 Jul 2019 00:15:40 +0000 (09:15 +0900)]
[moco_tf] tensor_shape setter in ShapeInferenceData (#4084)

This will add tensor_shape setter in ShapeInferenceData

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Add more methods in Convert (#4070)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 23:52:39 +0000 (08:52 +0900)]
[moco/tf] Add more methods in Convert (#4070)

* [moco/tf] Add more methods in Convert

This will add more methods in Convert for import

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* use ASSERT_EQ

5 years ago[loco] ReLU6 node (#4077)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 3 Jul 2019 09:12:48 +0000 (18:12 +0900)]
[loco] ReLU6 node (#4077)

This commit introduce ReLU6 node to loco.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
5 years ago[mocotest/tf] Use TEST_REPO & TEST_SPACE variables (#4074)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 3 Jul 2019 08:16:20 +0000 (17:16 +0900)]
[mocotest/tf] Use TEST_REPO & TEST_SPACE variables (#4074)

This commit updates mocotest-tf's CMakeLists.txt to use TEST_REPO &
TEST_SPACE variables instead of CMAKE_CURRENT_SOURCE_DIR &
CMAKE_CURRENT_BINARY_DIR.

This change gives some flexibility on test directory layout.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Run TFOptimizier and Canonicalizer (#4073)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 07:56:33 +0000 (16:56 +0900)]
[moco/tf] Run TFOptimizier and Canonicalizer (#4073)

This will make frontend to run TFOptimizier and Canonicalizer

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Knob for ResolveFusedBatchNorm (#4075)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 07:56:03 +0000 (16:56 +0900)]
[moco/tf] Knob for ResolveFusedBatchNorm (#4075)

This will add a knob for ResolveFusedBatchNorm transform

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[plier/tf] copy_shape() function (#4066)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 07:29:42 +0000 (16:29 +0900)]
[plier/tf] copy_shape() function (#4066)

* [plier/tf] copy_shape() function

This adds copy_shape() function that copies tensorflow shape proto to angkor shape.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* comment

5 years ago[tf2tflite] Use exo-tflite instead of loco-exporter (#4071)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 3 Jul 2019 07:28:43 +0000 (16:28 +0900)]
[tf2tflite] Use exo-tflite instead of loco-exporter (#4071)

This commit revises tf2tflite to use exo-tflite instead of
loco-exporter. This change resolves conflicts when loco-exporter
evolves into a in-house package exporter.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[locomotiv] Add Reshape operation (#4033)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Wed, 3 Jul 2019 06:31:45 +0000 (15:31 +0900)]
[locomotiv] Add Reshape operation (#4033)

* [locomotiv] Add Reshape operation

This commit introduce Reshape operation to locomotiv.

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
* This commit modify code according to comments.

5 years agoIntroduce exo-tflite (#4050)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 3 Jul 2019 06:31:31 +0000 (15:31 +0900)]
Introduce exo-tflite (#4050)

* Introduce exo-tflite

This commit introduces exo-tflite project. All the code itself originates
from loco-exporter, but have small style changes.

This "exo-tflite", unlike loco-exporter, will not evolve into an exporter for
in-house package.

Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Fix ifdef guard

5 years ago[moco/tf] Introduce Canonicalizer (#4045)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 05:42:43 +0000 (14:42 +0900)]
[moco/tf] Introduce Canonicalizer (#4045)

* [moco/tf] Introduce Canonicalizer

This will introduce Canonicalizer for transforming TFNodes to CanonicalNodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* remove test

5 years ago[tf2tflite] Rename testcases (#4064)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 3 Jul 2019 05:00:55 +0000 (14:00 +0900)]
[tf2tflite] Rename testcases (#4064)

This commit renames the tests that have a name conflict with moco-tf.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Support FeatureCodec clone (#4062)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 3 Jul 2019 05:00:41 +0000 (14:00 +0900)]
[loco] Support FeatureCodec clone (#4062)

This commit introduce "clone" API to FeatureEncoder/Decoder interface.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years agoIntroduce NNCC_EXTERNALS_DIR configuration (#4065)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 3 Jul 2019 04:20:02 +0000 (13:20 +0900)]
Introduce NNCC_EXTERNALS_DIR configuration (#4065)

This commit allows users to download external dependencies
into their own location via setting NNCC_EXTERNALS_DIR.

Note that the default behavior is same as before.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[plier/tf] Introducing plier/tf (#4056)
윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 03:16:35 +0000 (12:16 +0900)]
[plier/tf] Introducing plier/tf (#4056)

* [plier/tf] Introducing plier/tf

This commit introduce `plier/tf`, which is a set of small tools to handle Tensorflow model. These are currently copied from `moco/../Convert.h and cpp` and `moco/../TestHelper.h and cpp`.

Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* typo

* remove loco

5 years ago[moco/tf] Introduce TFMul IR (#4061)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 01:40:15 +0000 (10:40 +0900)]
[moco/tf] Introduce TFMul IR (#4061)

This will add TFMul IR and related codes to support TensorFlow Mul node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Add transforms for TFAdd (#4060)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Wed, 3 Jul 2019 00:22:56 +0000 (09:22 +0900)]
[moco/tf] Add transforms for TFAdd (#4060)

This will add missing TFAdd related transforms

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Import FusedBatchNorm (#4053)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 23:59:59 +0000 (08:59 +0900)]
[moco/tf] Import FusedBatchNorm (#4053)

* [moco/tf] Import FusedBatchNorm

This will add import of FusedBatchNorm to TFFusedBatchNorm IR

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* add required transformation handlers

5 years ago[moco/tf] Test for TFFusdBatchNorm (#4052)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 23:59:02 +0000 (08:59 +0900)]
[moco/tf] Test for TFFusdBatchNorm (#4052)

This will add ctor unit test of TFFusedBatchNorm

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Introduce TFAdd IR (#4051)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 22:26:17 +0000 (07:26 +0900)]
[moco/tf] Introduce TFAdd IR (#4051)

* [moco/tf] Introduce TFAdd IR

This will introduce TensorFlow dialect Add IR
- this will be used as intermediate node while resolving FusedBatchNorm node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* apply comments

* another comment

* privode GraphDef example

5 years agoUpdate README.modified (#4048)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 09:21:47 +0000 (18:21 +0900)]
Update README.modified (#4048)

- Add `Mainterners` and `Committers` list to following the rule of Samsung
Inner Source Program.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years ago[tf2tflite] Add TF_SMALL_NET_0001 test (#4047)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 2 Jul 2019 08:03:04 +0000 (17:03 +0900)]
[tf2tflite] Add TF_SMALL_NET_0001 test (#4047)

This commit adds TF_SMALL_NET_0001 test which sequentially performs
Conv2D-BiasAdd-Conv2D operations.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Introduce TFOptimizier (#4049)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 07:45:38 +0000 (16:45 +0900)]
[moco/tf] Introduce TFOptimizier (#4049)

This will introduce TFOptimizier to provide transformations with TensorFlow Dialects

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Add ImportAsTFConv2D knob (#4044)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 07:43:35 +0000 (16:43 +0900)]
[moco/tf] Add ImportAsTFConv2D knob (#4044)

This will add ImportAsTFConv2D in knob to switch Conv2D import as Canonical or TensorFlow Conv2D

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years agoAdd TensorFlow 1.14 source package (#4043)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 2 Jul 2019 05:03:06 +0000 (14:03 +0900)]
Add TensorFlow 1.14 source package (#4043)

This commit introduces TensorFlow v1.1.4 source package which allows
each sub-project to access T/F 1.14 source during build.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[mocotest/tf] FusedBatchNorm_001 (#4042)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 04:30:17 +0000 (13:30 +0900)]
[mocotest/tf] FusedBatchNorm_001 (#4042)

This will add FusedBatchNorm_001 test material having values for calculation validation

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[mocotest/tf] FusedBatchNorm_000 (#4041)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 04:29:48 +0000 (13:29 +0900)]
[mocotest/tf] FusedBatchNorm_000 (#4041)

This will add FusedBatchNorm_000 test material for minimul testing for FusedBatchNorm node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Introduce Domain Conversion Simplification (#4037)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 2 Jul 2019 04:05:52 +0000 (13:05 +0900)]
[moco/tf] Introduce Domain Conversion Simplification (#4037)

This commit introduces Domain Conversion Simplification optimizations
which convertes FeatureDecode followed by FeatureEncode as Forward.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Move Transform.h to the top-level (#4038)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Tue, 2 Jul 2019 03:12:59 +0000 (12:12 +0900)]
[moco/tf] Move Transform.h to the top-level (#4038)

This change makes it easy to distinguish Transform declaration (Transform.h) and
enumerate its implementations (all the files under Transforms/).

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Introduce TFFusedBatchNorm IR (#4039)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 03:05:56 +0000 (12:05 +0900)]
[moco/tf] Introduce TFFusedBatchNorm IR (#4039)

This will introduce TFFusedBatchNorm to import TensorFlow FusedBatchNorm node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Add TFNode visitor (#4036)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jul 2019 00:51:15 +0000 (09:51 +0900)]
[moco/tf] Add TFNode visitor (#4036)

* [moco/tf] Add TFNode visitor

This will add visitor related methods in TFNode

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* fix comments

5 years ago[moco/tf] Implement Dead Node Elimination (#4032)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 1 Jul 2019 10:50:32 +0000 (19:50 +0900)]
[moco/tf] Implement Dead Node Elimination (#4032)

Now, moco.tf compilation pipiline support Dead Node Elimination. Note that
this optimization is off by default.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Introduce TFNode for TensorFlow dialect (#4029)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 09:31:33 +0000 (18:31 +0900)]
[moco/tf] Introduce TFNode for TensorFlow dialect (#4029)

This will introduce TFNode and TFNodeImpl for Tensorflow dialect

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[loco] Introduce active_nodes helper (#4014)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 1 Jul 2019 09:03:40 +0000 (18:03 +0900)]
[loco] Introduce active_nodes helper (#4014)

This commit introduces active_nodes helpers which returns all the
predecessor of a given set of nodes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Rename macro as CANONICAL_NODE (#4025)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 07:45:06 +0000 (16:45 +0900)]
[moco/tf] Rename macro as CANONICAL_NODE (#4025)

* [moco/tf] Rename macro as CANONICAL_NODE

This will rename existing MOCONODE to CANONICAL_NODE as they are actually treating loco canonical nodes

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* use canonical

5 years ago[moco/tf] Introduce TFOpcode (#4028)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 07:12:05 +0000 (16:12 +0900)]
[moco/tf] Introduce TFOpcode (#4028)

This will introduce TFOpcode for TensorFlow dialect

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[moco/tf] Implement forward node elimination (#4027)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 1 Jul 2019 06:41:02 +0000 (15:41 +0900)]
[moco/tf] Implement forward node elimination (#4027)

This commit implements forward node elimination as a part of moco.tf
compilation pipeline.

Note that this transform is off by default.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] Import to Importer (#4019)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 05:23:37 +0000 (14:23 +0900)]
[moco/tf] Import to Importer (#4019)

* [moco/tf] Import to Importer

This will rename Import class to Importer
- abd method load() to `import`

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* fix header

5 years ago[moco_tf] Introduce TFDialect (#4020)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 05:13:10 +0000 (14:13 +0900)]
[moco_tf] Introduce TFDialect (#4020)

* [moco_tf] Introduce TFDialect

This will introduce TFDialect inherited from loco::Dialect to provide IRs for TensorFlow dialect.

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
* rename to TFDialect
* fix typo
* fix rename

5 years ago[moco/tf] Use TensorFlow (#4026)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 05:09:48 +0000 (14:09 +0900)]
[moco/tf] Use TensorFlow (#4026)

This will fix comments using Tensorflow to TensorFlow

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[mocotest] Test for Mul (#4024)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 04:25:43 +0000 (13:25 +0900)]
[mocotest] Test for Mul (#4024)

This will introduce test for Mul node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[mocotest] Test for Add (#4023)
박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 04:25:11 +0000 (13:25 +0900)]
[mocotest] Test for Add (#4023)

This will introduce Test for Add Node

Signed-off-by: SaeHie Park <saehie.park@samsung.com>
5 years ago[tf2tflite] Pass test configurations via .config file (#4017)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 1 Jul 2019 04:08:55 +0000 (13:08 +0900)]
[tf2tflite] Pass test configurations via .config file (#4017)

* [tf2tflite] Pass test configurationss via .config file

Now, "testall" script takes test configurations via .config
file, which makes it easy to re-invoke tests from command-line.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Update comment to reflect the actual implementation

5 years agoAdd CONTRIBTUTORS list (#4021)
이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 [Mon, 1 Jul 2019 03:52:44 +0000 (12:52 +0900)]
Add CONTRIBTUTORS list (#4021)

- Add contributor list, as is.
- Generated by `git shortlog -se | cut -f2` with `.mailmap` file.

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
5 years ago[moco.tf] Introduce Optimizer (#4013)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Mon, 1 Jul 2019 03:42:24 +0000 (12:42 +0900)]
[moco.tf] Introduce Optimizer (#4013)

This commit introduces Optimizer class and updates Frontend to invoke
this optimization after import.

This Optimizer will performs dedicated transforms on imported graphs,
but the current implementation serves just as a placeholder and has
no transforms yet.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] modify struct to class (#4016)
채성우/On-Device Lab(SR)/Engineer/삼성전자 [Sun, 30 Jun 2019 23:27:22 +0000 (08:27 +0900)]
[loco] modify struct to class (#4016)

This commit modify struct to class in Nodes.h for unity

Signed-off-by: seongwoo <sw4670.chae@samsung.com>
5 years ago[tf2tflite] Add TF_SMALL_NET_0000 test (#4012)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 28 Jun 2019 04:29:58 +0000 (13:29 +0900)]
[tf2tflite] Add TF_SMALL_NET_0000 test (#4012)

This commit adds TF_SMALL_NET_0000 test which includes a simple network
consists of Conv2D and MaxPool.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Check references on node destruction (#4010)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 28 Jun 2019 04:29:20 +0000 (13:29 +0900)]
[loco] Check references on node destruction (#4010)

This commit adds an assert to check references in Node destructor in
order to detect dangling references as early as possible.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[tf2tflite] Support logging (#4009)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 28 Jun 2019 04:02:53 +0000 (13:02 +0900)]
[tf2tflite] Support logging (#4009)

Now, users are able to enable tf2tflite logging by setting TF2TFLITE_Log
environment variable as a non-zero value.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Support node destruction (#4006)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 28 Jun 2019 01:46:55 +0000 (10:46 +0900)]
[loco] Support node destruction (#4006)

Some optimizations (e.g. dead node elimination) needs node destruction, but
it is currently impossible to destroy nodes.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco.tf] Extract Phase infrastructure (#4008)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 28 Jun 2019 01:29:08 +0000 (10:29 +0900)]
[moco.tf] Extract Phase infrastructure (#4008)

This commit extracts "transform" loop in Import as reusable Phase
class.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Introduce CanonicalNodeDecl.h (#4007)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Fri, 28 Jun 2019 01:25:38 +0000 (10:25 +0900)]
[loco] Introduce CanonicalNodeDecl.h (#4007)

The current implementation requires users to include CanonicalNodeImpl.h
additionally.

To eliminate such burden, this commit introduces CanonicalNodeDecl.h and
revises CanonicalNode.h to includes both decl/impl headers.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[loco] Introduce Node.opnum API (#4004)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 27 Jun 2019 07:14:49 +0000 (16:14 +0900)]
[loco] Introduce Node.opnum API (#4004)

This opnum API allows us to check the type of nodes without using
dynamic_cast.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[locop] Support TensorConcat (#4001)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 27 Jun 2019 07:10:32 +0000 (16:10 +0900)]
[locop] Support TensorConcat (#4001)

TensorConcat now has its own pretty printer.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
5 years ago[moco/tf] How to convert TensorFlow Const (#4002)
박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 [Thu, 27 Jun 2019 07:10:18 +0000 (16:10 +0900)]
[moco/tf] How to convert TensorFlow Const (#4002)

Conversion.md now explains how to convert T/F Const node (which
tf.constant API internally generates) into loco.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>