2 Copyright (c) 2018 Intel Corporation
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
19 from extensions.front.onnx.pad_ext import PadFrontExtractor
20 from mo.utils.unittest.extractors import PB, BaseExtractorsTestingClass
23 class TestPad(BaseExtractorsTestingClass):
25 def _create_node(pads=None, value=None, mode=None):
32 pb = onnx.helper.make_node(
44 node = self._create_node()
45 PadFrontExtractor.extract(node)
49 'pads': [[1, 3], [2, 4]],
56 def test_reflect(self):
57 node = self._create_node(mode='reflect')
58 PadFrontExtractor.extract(node)
62 'pads': [[1, 3], [2, 4]],
69 def test_non_zero_fill_value(self):
70 node = self._create_node(value=1.0)
71 PadFrontExtractor.extract(node)
75 'pads': [[1, 3], [2, 4]],