Commit Graph

55 Commits

Author SHA1 Message Date
Tomasz Socha
c19cd4765b Add reshaping of dynamic network in python tests (#1850) 2020-08-24 13:58:38 +02:00
Ewa Tusień
a8e611f90b Change "run_op_node" helper to use Parameter instead of Constant (#1722)
* Replace Constant with Parameter in run_op_node.

* Pass inputs to function.

* Add func to get shape.

* Make constant if input is scalar.

* Add case for list.

* Fix test.

* Split tests for run_op_node and run_op_numeric_data.

* Split more tests.

* Split more and more tests.

* Mark tests with xfail.

* Mark more tests with xfail.

* Replace scalar with parameter.

* Code formatting.

* Set empty shape for scalar.

* Remove check for list.
2020-08-19 17:55:20 +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
Mateusz Bencer
ea80bc3d6f Add ONNX Round op (#1605) 2020-08-18 12:10:23 +02: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
Ilya Churaev
d8133824b3 Deprecate FusedOp class (#1758)
* Deprecate FusedOps

* Try to fix windows

* Added temp headers
2020-08-14 06:27: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
Rafal Blaczkowski
0721761492 Enable Model Zoo in OpenVINO-ONNX CI (#1660) 2020-08-11 09:28:55 +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
Rafal Blaczkowski
054a7cdf8d Enable ngraph python tests in OpenVINO-ONNX CI (#1603)
* Enable ngraph python tests

* Refactor and unify ngraph with onnx python tests

* Revert deprecated test cases

* Set ngraph and onnx python tests as a one test suite execution

* Change unstrict Xfails to strict ones

* Update after review:
 - add model zoo to onnx tests,
 - improvements of tests

* Revert mounting zoo models dir

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>
2020-08-07 09:58:57 +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
Rafal Blaczkowski
4f96ea684a Update xfail status of onnx python tests (#1639) 2020-08-05 12:20:07 +03:00
Michał Karzyński
dbb87462f6 Change working directory in setup.py (#1624)
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-08-05 12:07:04 +03:00
Nadezhda Ageeva
7c78b0d03d [PYTHON][nGraph] add get_type_name for element type (#1513) 2020-08-04 19:01:12 +03:00
Rafal Blaczkowski
d14d09e796 Update ONNX Python tests (#1514) 2020-08-04 12:26:32 +02: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
Tomasz Socha
91c71b81e0 [nG][Python]Make model runner compatibile with python 3.5 (#1578) 2020-08-03 12:56:59 +02:00
Adam Osewski
1c22023a8e Fix typo. (#1571) 2020-07-31 15:05:53 +03:00
Jan Iwaszkiewicz
43652498c7 [nGraph] Py API get/set partial shape of parameter (#1560) 2020-07-31 10:14:39 +02:00
Adam Osewski
fc5d8c75d3 Fix false positives in ModelRunner. (#1541) 2020-07-30 13:26:19 +02:00
Jan Iwaszkiewicz
0f62031991 [nGraph] Matching names of functions (#1524) 2020-07-30 13:25:42 +02:00
Jan Iwaszkiewicz
13ae51930b Fix node name tests (#1507) 2020-07-29 12:27:30 +02:00
Jan Iwaszkiewicz
185cafb4cc [nGraph] Remove legacy Python API (1) (#1504) 2020-07-29 12:19:05 +02:00
Adam Osewski
3a87653483 ONNX Model runner (#1415) 2020-07-29 09:34:35 +02:00
Ilya Churaev
534fe35c0a Remove old transformation passes (#1463) 2020-07-28 08:54:50 +03:00
Adam Osewski
093a02fcef Test fix import of ONNX model in serialized Protobuf binary format. (#1355)
* Try fix parsing error.

* Small exception refinements during importing model.

* More exception refinements.

* Skip segfaulting tests.

* More clear error types and messages. Func rename.

* Fix typo.

* Check on CI whether test_onnx will work.

* Add only those file which pass tests or have failing ones skipped.
2020-07-22 13:52:53 +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
Tomasz Socha
28227dcd9f [nGraph][Py][Tests] Remove backup of old models (#1349) 2020-07-17 15:12:11 +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
Ilya Churaev
e0cf66b31a Fixed cpack information, removed some links (#976) 2020-06-17 17:17:32 +03:00