Commit Graph

44 Commits

Author SHA1 Message Date
Jan Iwaszkiewicz f4cb425396
[nGraph] Enable u1 data type in Constant PyAPI (#2084) 2020-09-08 13:11:05 +02:00
Ivan Tikhonov 2f5a28d44f
LSTMCell/Sequence v1, reference implementations and decompose transformations for LSTM/GRU/RNN Cells (#2000)
* validate_and_infer_types() implementation

* input parameter validation for LSTM, GRU and RNN

* style-check applied

* Add LSTMSequence dynamic shape validation and test props for RNNCell, GRUCell, LSTMCell and LSTMSequence.

* recurrent_sequence.hpp moved to ngraph/core/include/ngraph/op/util/

* style check applied

* removed unused variable from LSTMSequence::validate_and_infer_types

* Add missing newline mark at the end of file.

* Add supression macro for FusedOp deprecation.

* Add element type initialization

* transpose,rnn cell reference implementations

* Apply PR review remarks

* reference implementations for cells op, single layer tests, align lstm cell/sequence according to the spec

* lstm/gru/rnn cell decompostion transformations

* ngraph codestyle

* clean up

* ngraph code style

* change inheritance of Cells, fix build

* fix build

* fix build again

* remove Peepholes from LSTMSeq, fix copy_runtime_info in transformations

* Rewrite tests to use gtest exception assertions.

* resolve tests issues

* ngraph codestyle

* add missed files

* fix typeprop tests

* fix lstm sequence checks

* fix arm build

* fix arm again

* delete unnecessary file

* add convert weghts format function, enable lstm test, resolve review comments

* add ngraph builders

* ngraph codestyle

* fix unit tests

* revert transpose reference implementation

* revert LSTM Cell v0, add LSTMCell v1, update transformation lstm_cell_to_cell_ie

* v1 version of LSTMCell op

* LSTMSequence v1 operation, exclude LSTMSeq from opset4

* fix python api tests

* resolve review comments, tests for decomposition transformations, switch lstm cell to opset4 in mo

Co-authored-by: Szymon Durawa <szymon.durawa@intel.com>
2020-09-04 09:04:36 +03:00
Ilya Churaev 02c8a3c358
Removed attrs prefix for some layers (#2037)
* Removed attrs prefix for some layers

* Fixed tests
2020-09-03 07:58:07 +03:00
Jan Iwaszkiewicz c147f03d5f
[nGraph] RTInfo refactor (#1806) 2020-08-27 15:41:21 +02:00
Anton Chetverikov 84c7b048db
SoftPlus operation implementation (#1365) 2020-08-25 19:36:39 +03:00
Tomasz Socha c19cd4765b
Add reshaping of dynamic network in python tests (#1850) 2020-08-24 13:58:38 +02:00
Katarzyna Mitrus ceb8a25c94
Enable HSwish - ngraph op, fusion/decomposition and reference implementation (#1770)
* Add HSwish operator to nGraph

* Add HSwishFusion transformation

* Update check_constant function

* Add reference implementation for HSwish

* Enable reference implemenation in HSwish evaluate

* Add op_eval test

* HSwish fusion transformation test

* Add HSwishFusionWithoutRelu transformation

* Add more hswish fusion tests

* Register HSwishFusion pass in common_optimizations

* Update HSwish reference implementation

* Add HSwishFusion with Relu and Multiply

* Add HSwishDecomposition transformation pass

* Add HSwishDecomposition test

* Add HSwish op to ngraph python API

* Update HSwish fusion transformations

* Remove HSwishFusion from common optimizations

* Update hswish python API

* Add bf16 to evaluate hswish

* Update hswish python API

* Move hswish reference implementation

* UnaryElementwiseArithmetic inheritance

* Enable HSwish callback for clDNN

* Register HSwishDecomposition pass in ConvertOpSet1ToLegacy

* Enable HSwishFusion pass in common optimizations

* Use NGRAPH_RTTI_DECLARATION

* Moved python hswish test to the test_ops_unary
2020-08-19 08:04:00 +03:00
Ivan Tikhonov c5ca8f5b51
Remove ngraph::Lambda class, replace TensorIterator body with ngraph::Function (#1830)
* remove Lambda class, replace TensorIterator body with ngraph::Function

* Fix passing parameters from parent graph to subgraph

Co-authored-by: mbencer <mateusz.bencer@intel.com>
2020-08-19 07:09:32 +03:00
Evgeny Lazarev 125a462400
Enable ReduceL1 and ReduceL2 operations (#1799)
* Initial version of ReduceL1, ReduceL2 and ReduceLp enabling in the MO

* Added operations ReduceL1 and ReduceL2 to nGraph

* Removed ReduceLp. Added ReduceL1 and ReduceL2

* Separated specification of ReduceLp into ReduceL1 and ReduceL2

* Updated ReduceL1 and ReduceL2 specification

* Fixed ReduceL1 and ReduceL2 type prop tests

* Implemented nGraph transformation to decompose ReduceL1 and ReduceL2. Disabled them for CPU and GPU plugins

* Updated supported framework layers

* Added unit tests for ReduceL1 and ReduceL2 reference implementation

* Fixed ReduceXXX operations reference implementation by adding support for a new parameter 'keep_dims'

* Fixed constant folding for v0::Any

* Added ReduceL1 and ReduceL2 to Python API

* Implemented ReduceL1 and ReduceL2 decomposition tests and fixed ReduceL2 decomposition

* Added specific creator for ReduceXXX operations instead of NodeBuilders

* Fixed conversion ReduceXXX to CNNLayer

* Fixed parser for ReduceLogicalXXX operations
2020-08-17 16:32:53 +03:00
Pavel Esir 4302e2c120
add preliminary support of Proposal-4 in nGraph (#1448)
renamed logits -> bbox_deltas

updated ngraph unittests for Proposal

removed validate_and_infer_types Proposal-4

removed validate_and_infer_types Proposal-4

changed validate_and_infer_types in parent class of Proposal

removed get_output_size

successfully inferred Proposal on SSH and Faster-RCNN

added unittests for Proposal-4

added unittests for Proposal-4

added unittests for Proposal-4

returned back default namespace for Proposal

reduced number of outputs in v0::Proposal

correct conversion of Proposal-4 -> propodal_ie with 2 outputs

removed creator for proposal v0

removed converter for proposal v0

added Proposal-4 to MO

removed `for_deformable` attribute

added Proposal-4 to MO and nGraph Python API

removed typo in Proposal-4 specification

style corrections

style corrections and removed some redundant code

rename proposal Python api test

removed 'attrs' context from visitor

returned back AttrVisitor to check if passes OpenVINO ONNX pipeline

Should pass OpenVINO ONNX pipeline (returned back AttrVisitor just to check)

python api for Proposal-4 works ok

(style correction) python api for Proposal-4 works ok

parametrized proposal_ie some other corrections

removed 'attrs.' context from nGraph Python API tests for Proposal

minor corrections in replacer proposal->proposal_ie

corrected Python API OpenVINO-ONNX tests should pass

Improved workaround for AttributeVisitor for Proposal

Add additional check of im_info tensor shape to Proposal node in MKLDNNPlugin

😠 removed 4 extra spaces from test_dyn_attributes.py to match The Style

added new nGraph RTTI declarations, removed throwing exception in transformation

added new nGraph RTTI declarations, removed throwing exception in transformation, corrected exception in MKLDNNplugin

corrected im_info size checking in Proposal node of MKLDNNPlugin
2020-08-16 15:49:49 +03:00
iliya mironov 0cc63cbb05
Add asinh acosh atanh to python api (#1488)
* Add asinh acosh atanh to python api
2020-08-14 10:07:58 +03:00
Jan Iwaszkiewicz 680cdacc11
[nGraph] Add Manager to Py API (#1533)
* Added test

* working ManagerWrapper

* Clean-up in ManagerWrapper

* worksave

* fixed building error

* Finished test of constant folding

* remove unused param

* Added get_vector function

* clean up
2020-08-13 19:56:59 +03:00
Jan Iwaszkiewicz 2b6b047b43
[nGraph] Create Python API support for rt_info (#1696) 2020-08-11 15:57:31 +02:00
Jan Iwaszkiewicz 2b474c8a47
Fixed access to the data of FP16 IRs with nGraph Python API (#1707) 2020-08-11 07:16:11 +03:00
Evgeny Lazarev 318d38770b
Enable swish (#1682)
* Draft version of the Swish nGraph operation and fusing transformations for different approaches to express the operation

* Swish fusing transformation refactoring

* Added Swish operation and extractor for TF. Removed unfolding transformation for the operation.

* Added SwishIE. Implemented transformation to convert Swish to SwishIE.

* Code style fixes

* Updated Swish reference implementation. Added tests for shape and value inference


* Fixed code style for Python API

* Fixed unit test

* Apply review comments

* Use matcher_pass_callback

* Make m_alpha attribute protected in the SwishIE operation

* Fixed Swish op PythonAPI test
2020-08-10 15:51:21 +03:00
iliya mironov 7e856c3700
Add mish fusion transformation (#1399)
* Add mish fusion transformation

* Add mish op to python api
2020-08-06 15:55:12 +03:00
Roman Kazantsev ab869da588
Add CTCLoss op to nGraph Python API (#1642) 2020-08-06 15:03:39 +03:00
Ilya Churaev 7a314f216a
Remove JSON serializer (#1638) 2020-08-06 05:51:05 +03:00
Nadezhda Ageeva 7c78b0d03d
[PYTHON][nGraph] add get_type_name for element type (#1513) 2020-08-04 19:01:12 +03:00
Jan Iwaszkiewicz 136dccf905
[nGraph] Public Py API to get function from cnnnetwork (#1567) 2020-08-04 09:39:37 +02:00
Ewa Tusień 86fb108b00
Remove reverse op from pyAPI. (#1538) 2020-08-04 06:39:29 +03:00
Jan Iwaszkiewicz 43652498c7
[nGraph] Py API get/set partial shape of parameter (#1560) 2020-07-31 10:14:39 +02:00
Jan Iwaszkiewicz 0f62031991
[nGraph] Matching names of functions (#1524) 2020-07-30 13:25:42 +02:00
Jan Iwaszkiewicz 185cafb4cc
[nGraph] Remove legacy Python API (1) (#1504) 2020-07-29 12:19:05 +02:00
Ilya Churaev 534fe35c0a
Remove old transformation passes (#1463) 2020-07-28 08:54:50 +03:00
Ewa Tusień 821a3dae32
Expose OpSets as part of nGraph PythonAPI (#1261) 2020-07-22 12:02:54 +02:00
Ilya Churaev 54ae67414e
Remove redundant node methods (#1324)
* Remove placement

* Removed validate and infer eltwise

* Remove is eltwise

* Remove support broadcast and decompose

* Removed is_op, is_parameter, is_pattern

* Fixed code style

* Added is_constant and is_output

* Removed is_communicative and is_null

* Fixed code style

* Fixed typo

* Fixed comments

* Fixed typo

* Revert is_parameter, is_output, is_result for OpenCV build
2020-07-21 06:02:00 +03:00
Jan Iwaszkiewicz d4c9af91d8
Add getting/setting friendly name for Node wrapper Py API (#1286) 2020-07-20 10:31:49 +02:00
Jan Iwaszkiewicz db09547087
Add Input and Output class to Py API (#1284) 2020-07-15 15:32:24 +02:00
Rafal Blaczkowski 07f0d1c492
Add OpenVINO-ONNX CI check (#688) 2020-07-14 14:57:27 +02:00
Michał Karzyński cc23e6043a
Add nGraph-ONNX tests (#1215) 2020-07-10 11:53:56 +02:00
Tomasz Dołbniak 65657ea5c5
Fix the __repr__ function for dynamic shapes (#1210) 2020-07-09 15:52:25 +02:00
Michał Karzyński bd8a383560
Enable nGraph Python API unit tests using Inference Engine APIs (#1095) 2020-07-03 18:11:39 +02:00
Adam Osewski b72e56e51d
Remove reference to removed function. (#1192) 2020-07-03 05:46:17 +03:00
Evgeny Lazarev f596432268
NMS-4 op support (#1115)
* Specification for the NMS-4 operation (updated shape infer function)

* Enabled NMS-4 in the Model Optimizer

* Changed opset version for NMS with dynamic outputs and namespace to be "dynamic"

* Added NMS-4

* Added opset4 to the nGraph

* Added unit tests for NMS-4 type infer

* Renamed UpgradeNMS3ToNMS4 to UpgradeNMS3ToNMSDynamic. Added stub for ConvertNMS4ToLegacy

* Make IE aware of opset4 ops

* Updated NMSIE to have different shape infer function based on the NMS it was converted from. Implemented NMS4->NMSIE conversion

* Apply code style

* Updated StaticShapeNonMaximumSuppression op in the VPU

* Introduced new version of NMSIE operation with shape infer function from v4::NMS

* Fixed dynamicToStaticNonMaxSuppression transformation

* Added new version of NMSIE op with updated shape infer function

* Fixed NMS4 to NMSIE2 transformation

* Fixed constructors for nGraph ops v4::NM and dynamic::NMS

* Updated text in the opset4 specification document

* Code style fixes

* Fixed constructors for StaticShapeNMS + fixed test

* Minor change to the NMS op in the MO

* Fixed typo in the dynamic_to_static_shape_non_max_suppression transformation

* Removed redundant checks

* Refactored NMS infer and validate functions

* Added more checks to the validate_and_infer_types functions for NMS-3 and NMS-4

* Fixed compilation issue on Windows for op NMS

* Code style fixes

* Fixed typos in the NMSIE and NMSIE2 to CNNLayer op conversion

* Fixed typo in the ie_cnn_layer_builder_ngraph.cpp

* Fixed the NMSToLegacyNMS transformation. Added unit tests

* Apply code review comments

* Refactored NMSIE to use visitors

* Removed calling ConvertNMS4ToLegacy in the common optimizations

* Moved NMS4ToNMSLegacy to convert1_to_legacy group of transformations

* Removed useless include statement

* Removed copy-paste issue

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2020-06-30 14:04:31 +03:00
Adam Osewski d0be6b1d2f
Dynamic attribute getters and setters. (#964) 2020-06-26 16:35:00 +02:00
Michał Karzyński 5f4f70e408
Fixes in TensorIterator builder code (#1104) 2020-06-26 10:16:51 +02:00
Michał Karzyński 69a342ea68
Fixes for building nGraph Python API (#707) 2020-06-23 17:32:37 +02:00
Adam Osewski 491e5e9fbb
[Py] Ngraph Py API TensorIterator (#718) 2020-06-22 11:40:58 +02:00
Tomasz Dołbniak 53927034da
Python API for Assign, ReadValue and ExtractImagePatches (#719) 2020-06-03 15:01:43 +02:00
Katarzyna Mitrus 5f8f9ec108
[nGraph] Reorder nGraph LSTMSequence inputs and outputs dimensions (#560)
* Reorder nGraph LSTMSequence input/outpt dimensions

* Update nGraph pythonAPI for LSTMSequence

* Reorder axes in ONNX importer LSTM

* Tests update

* Fix clang warning

* Use opset3 namespace

* Style apply

* Tests update

* Use opset1  namespace

* Remove usage of  GetOutputElement in ONNX importer LSTM

* Remove opset0 header

* Use Node::output()
2020-05-29 14:29:18 +03:00
Michał Karzyński 125dd89c01
Remove Runtime classes from nGraph Python API (#569) 2020-05-28 09:50:57 +02:00
Alexey Suhov deb008a26f publish master branch snapshot, revision 8d31237e2c3f673cbb0f0ba110fc10f5cce1d2bb 2020-05-22 02:23:12 +03:00
Alexey Suhov f30dcc218c publish master branch snapshot, revision 9df5eb1f84e13a35720a918f88324561222ab114 2020-05-20 01:13:06 +03:00