Publishing 2019 R1 content
[platform/upstream/dldt.git] / model-optimizer / extensions / middle / PixelLinkReshape_test.py
index e281f60..11a41c5 100644 (file)
@@ -1,5 +1,5 @@
 """
- Copyright (c) 2018 Intel Corporation
+ Copyright (c) 2018-2019 Intel Corporation
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -38,6 +38,9 @@ nodes_attributes = {
     'reshape_split/Permute_before_data': {'value': None, 'shape': None, 'kind': 'data'},
     'reshape_pack/Permute_after': {'type': 'Permute', 'kind': 'op', 'op': 'Permute'},
     'reshape_pack/Permute_after_data': {'value': None, 'shape': None, 'kind': 'data'},
+    # uncoment when strided slice will be enabled
+    # 'reshape_unpack/Permute_after_unpack': {'type': 'Permute', 'kind': 'op', 'op': 'Permute'},
+    # 'reshape_unpack/Permute_after_unpack_data': {'value': None, 'shape': None, 'kind': 'data'},
     # Softmax layer
     'softmax_1': {'type': 'SoftMax', 'kind': 'op', 'op': 'SoftMax'},
     'softmax_1_data': {'value': None, 'shape': None, 'kind': 'data'},
@@ -70,8 +73,11 @@ class ReshapeSoftmaxReshapeTests(unittest.TestCase):
                              'strided_slice': {
                                  'slices': [slice(0, 1, 1), slice(0, 227, 1), slice(0, 227, 1), slice(0, 8, 1),
                                             slice(1, 2, 1)],
-                                 'shrink_axis_mask': [False, False, False, False, True],
-                                 'new_axis_mask': [False, False, False, False, False]},
+                                 'shrink_axis_mask': [0, 0, 0, 0, 1],
+                                 'new_axis_mask': [0, 0, 0, 0, 0],
+                                 'ellipsis_mask': [0, 0, 0, 0, 0],
+                                 'begin_mask': [1, 1, 1, 1, 1],
+                                 'end_mask': [1, 1, 1, 1, 1], },
                              'strided_slice_data': {'shape': np.array([1, 227, 227, 8])},
                              })
         graph.graph['layout'] = 'NHWC'
@@ -88,10 +94,18 @@ class ReshapeSoftmaxReshapeTests(unittest.TestCase):
                                  ('reshape_pack/Permute_after', 'reshape_pack_data'),
                                  ('reshape_pack_data', 'softmax_1'),
                                  ('softmax_1', 'softmax_1_data'),
+                                 # comment when strided slice will be enabled
                                  ('softmax_1_data', 'strided_slice'),
                                  ('strided_slice', 'reshape_unpack_data'),
                                  ('reshape_unpack_data', 'reshape_unpack'),
-                                 ('reshape_unpack', 'strided_slice_data')
+                                 ('reshape_unpack', 'strided_slice_data'),
+                                 # uncomment when strided slice will be enabled
+                                 # ('softmax_1_data', 'reshape_unpack'),
+                                 # ('reshape_unpack', 'reshape_unpack/Permute_after_unpack_data'),
+                                 # ('reshape_unpack/Permute_after_unpack_data', 'reshape_unpack/Permute_after_unpack'),
+                                 # ('reshape_unpack/Permute_after_unpack', 'reshape_unpack_data'),
+                                 # ('reshape_unpack_data', 'strided_slice'),
+                                 # ('strided_slice', 'strided_slice_data'),
                                  ],
                                 {'placeholder_1_data': {'shape': np.array([1, 227, 227, 16])},
                                  'reshape_split/Permute_before_data': {'shape': np.array([1, 227, 16, 227])},
@@ -99,7 +113,11 @@ class ReshapeSoftmaxReshapeTests(unittest.TestCase):
                                  'reshape_pack_data': {'shape': np.array([1, 2, 1 * 227 * 227 * 8])},
                                  'reshape_pack/Permute_after_data': {'shape': np.array([1, 227 * 227 * 8, 2])},
                                  'softmax_1_data': {'shape': np.array([1, 2, 1 * 227 * 227 * 8])},
+                                 # comment when strided slice will be enabled
                                  'reshape_unpack_data': {'shape': np.array([1, 1, 227 * 227 * 8])},
+                                 # uncomment when strided slice will be enabled
+                                 # 'reshape_unpack_data': {'shape': np.array([1, 8, 227, 227, 2])},
+                                 # 'reshape_unpack/Permute_after_unpack_data': {'shape': np.array([1, 227, 227, 8, 2])},
                                  'strided_slice_data': {'shape': np.array([1, 227, 227, 8])}
                                  })