Skip to content

Commit c928fde

Browse files
authored
[MO] Remove Apache MxNet models support in openvino-dev (#26800)
**Details:** Due to drop of Python 3.8, MxNet support is removed. MxNet is archived project and distributed only up to Python 3.8 **Ticket:** 153365 --------- Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
1 parent f1431da commit c928fde

File tree

176 files changed

+40
-7393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+40
-7393
lines changed

.github/ISSUE_TEMPLATE/bug.yml

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ body:
5858
- Caffe
5959
- ONNX
6060
- PyTorch
61-
- mxnet
6261
- PaddlePaddle
6362
validations:
6463
required: false

.github/workflows/coverage.yml

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ jobs:
5151
# For running TensorFlow frontend unit tests
5252
python3 -m pip install -r ${{ github.workspace }}/src/frontends/tensorflow/tests/requirements.txt
5353
# For MO unit tests
54-
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_mxnet.txt
5554
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_caffe.txt
5655
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_kaldi.txt
5756
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_onnx.txt

.github/workflows/job_python_unit_tests.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ jobs:
9999
100100
extras_to_install="caffe,kaldi,onnx,tensorflow2,pytorch"
101101
102-
if [[ "${{ runner.arch }}" != "ARM64" ]]; then
103-
extras_to_install="mxnet,$extras_to_install"
104-
fi
105-
106102
# Find and install OV dev wheel
107103
pushd ${INSTALL_DIR}/tools
108104
ov_dev_wheel_name=$(find . -name 'openvino_dev*.whl')
@@ -142,8 +138,7 @@ jobs:
142138
143139
# Skips under tickets: 133405, 122666
144140
python3 -m pytest -s ${INSTALL_TEST_DIR}/mo/unit_tests \
145-
--junitxml=${INSTALL_TEST_DIR}/TEST-ModelOptimizer.xml \
146-
--ignore-glob="**/mo/unit_tests/mo/front/mxnet/**"
141+
--junitxml=${INSTALL_TEST_DIR}/TEST-ModelOptimizer.xml
147142
148143
- name: Python ONNX operators tests
149144
if: (fromJSON(inputs.affected-components).Python_API.test ||

.github/workflows/mo.yml

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
# For UT
4747
pip install unittest-xml-reporting==3.0.2
4848
# MO requirements
49-
pip install -r requirements_mxnet.txt
5049
pip install -r requirements_caffe.txt
5150
pip install -r requirements_kaldi.txt
5251
pip install -r requirements_onnx.txt

.github/workflows/windows_vs2019_release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ jobs:
286286
287287
# Find and install the dev OV wheel
288288
$ovDevWheelPath=Get-ChildItem -Path "${{ env.INSTALL_DIR }}\tools" -Filter openvino_dev*.whl | % { $_.FullName }
289-
python3 -m pip install "$ovDevWheelPath[mxnet,caffe,kaldi,onnx,tensorflow2,pytorch]"
289+
python3 -m pip install "$ovDevWheelPath[caffe,kaldi,onnx,tensorflow2,pytorch]"
290290
291291
- name: Install Python API tests dependencies
292292
run: |
@@ -316,7 +316,7 @@ jobs:
316316
if: fromJSON(needs.smart_ci.outputs.affected_components).MO.test
317317
shell: cmd
318318
run: |
319-
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests --ignore=${{ env.INSTALL_TEST_DIR }}/mo/unit_tests/mo/front/mxnet --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml
319+
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml
320320
321321
- name: Install Python Layer tests dependencies
322322
run: |

docs/articles_en/documentation/legacy-features.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ offering.
7878
Discontinued:
7979
#############
8080

81-
.. dropdown:: Apache MXNet, Caffe, and Kaldi model formats
81+
.. dropdown:: Caffe, and Kaldi model formats
8282

8383
| *New solution:* conversion to ONNX via external tools
8484
| *Old solution:* model support discontinued with OpenVINO 2024.0

docs/articles_en/documentation/legacy-features/transition-legacy-conversion-api/legacy-conversion-api/[legacy]-model-optimizer-faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Q14. What does the message "Cannot infer shape for node {} because there is no C
234234
Q15. What does the message "Framework name can not be deduced from the given options. Use --framework to choose one of Caffe, TensorFlow, MXNet" mean?
235235
######################################################################################################################################################
236236
237-
**A:** You have run Model Optimizer without a flag ``--framework caffe|tf|mxnet``. Model Optimizer tries to deduce the framework by the extension of input model file (``.pb`` for TensorFlow, ``.caffemodel`` for Caffe, ``.params`` for Apache MXNet). Your input model might have a different extension and you need to explicitly set the source framework. For example, use ``--framework caffe``.
237+
**A:** You have run Model Optimizer without a flag ``--framework caffe|tf``. Model Optimizer tries to deduce the framework by the extension of input model file (``.pb`` for TensorFlow, ``.caffemodel`` for Caffe, ``.params`` for Apache MXNet). Your input model might have a different extension and you need to explicitly set the source framework. For example, use ``--framework caffe``.
238238
239239
.. _question-16:
240240

docs/dev/ov_dependencies.txt

-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ mccabe
147147
mistune
148148
mongo-python-driver
149149
more-itertools
150-
mxnet
151150
mypy
152151
mypy-extensions
153152
networkx

docs/dev/pypi_publish/pypi-openvino-dev.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ pip install openvino-dev[extras]
8383
| :-------------------------------| :------------------------------------------------------------------------------- |
8484
| caffe | [Caffe*](https://caffe.berkeleyvision.org/) |
8585
| kaldi | [Kaldi*](https://github.com/kaldi-asr/kaldi) |
86-
| mxnet | [Apache MXNet*](https://mxnet.apache.org/) |
8786
| onnx | [ONNX*](https://github.com/microsoft/onnxruntime/) |
8887
| pytorch | [PyTorch*](https://pytorch.org/) |
8988
| tensorflow | [TensorFlow* 1.x](https://www.tensorflow.org/versions#tensorflow_1) |
@@ -149,14 +148,14 @@ Users in China might encounter errors while downloading sources via PIP during O
149148
If you use zsh (Z shell) interpreter, that is the default shell for macOS starting with version 10.15 (Catalina), you may encounter the following error while installing `openvino-dev` package with extras:
150149

151150
```sh
152-
pip install openvino-dev[tensorflow2,mxnet,caffe]
153-
zsh: no matches found: openvino-dev[tensorflow2,mxnet,caffe]
151+
pip install openvino-dev[tensorflow2,caffe]
152+
zsh: no matches found: openvino-dev[tensorflow2,caffe]
154153
```
155154

156155
By default zsh interprets square brackets as an expression for pattern matching. To resolve this issue, you need to escape the command with quotes:
157156

158157
```sh
159-
pip install 'openvino-dev[tensorflow2,mxnet,caffe]'
158+
pip install 'openvino-dev[tensorflow2,caffe]'
160159
```
161160

162161
To avoid such issues you can also disable globbing for PIP commands by defining an alias in `~/.zshrc` file:

docs/sphinx_setup/_static/download/supported_models.csv

-9
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,6 @@ facenet,Object Detection,onnx,FP16,,,+
211211
facenet,Object Detection,onnx,FP16-INT8,,,+
212212
facenet-20180408-102900,Object Detection,tf,FP16,+,+,+
213213
facenet-20180408-102900,Object Detection,tf,FP32,+,+,
214-
face-recognition-mobilefacenet-arcface,Object Detection,mxnet,FP16,,,+
215-
face-recognition-mobilefacenet-arcface,Object Detection,mxnet,FP16-INT8,,,+
216-
face-recognition-resnet50-arcface,Object Detection,mxnet,FP16,+,+,+
217-
face-recognition-resnet50-aws,Object Detection,mxnet,FP16,,,+
218-
face-recognition-resnet50-aws,Object Detection,mxnet,FP32,,,+
219214
face-reidentification-retail-0095,Object Detection,onnx,FP16,,,+
220215
face-reidentification-retail-0095,Object Detection,onnx,FP16-INT8,,,+
221216
facial-landmarks-35-adas-0002,Object Detection,caffe,FP16,,,+
@@ -428,8 +423,6 @@ ocrnet-hrnet-w18,Text Detection,paddle,FP16-INT8,+,+,
428423
ocrnet-hrnet-w18,Text Detection,paddle,FP32,+,,
429424
ocrnet-hrnet-w48,Text Detection,paddle,FP16,+,,
430425
ocrnet-hrnet-w48,Text Detection,paddle,FP32,+,,
431-
octave-resnext-101-0.25,Image Classification,mxnet,FP16,+,+,+
432-
octave-resnext-101-0.25,Image Classification,mxnet,FP32,+,,
433426
openchat-3.6-8b-20240522,Large Language Model,pytorch,intel-optimum default,,+,
434427
open-closed-eye-0001,Image Classification,onnx,FP16,,,+
435428
open-closed-eye-0001,Image Classification,onnx,FP16-INT8,,,+
@@ -629,8 +622,6 @@ squeezenet1.0-12,Image Classification,onnx,FP16,,,+
629622
squeezenet1.0-12,Image Classification,onnx,FP32,+,+,+
630623
squeezenet1.1-caffe,Image Classification,caffe,FP16,+,+,+
631624
squeezenet1.1-caffe,Image Classification,caffe,FP32,+,+,+
632-
squeezenet1.1-mxnet,Image Classification,mxnet,FP16,+,+,+
633-
squeezenet1.1-mxnet,Image Classification,mxnet,FP32,+,+,+
634625
squeezenet1.1-onnx,Image Classification,onnx,FP32,+,,
635626
srgan-onnx,"Image Processing, Enhancement",onnx,FP16,+,,+
636627
srgan-tf,"Image Processing, Enhancement",tf,FP16,+,+,

src/tests/test_utils/functional_test_utils/layer_tests_summary/conformance_helper_tools/conformance_vs_accuracy_comparator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_precision(self):
3838
return self.__model_prc
3939

4040
def path_to_model(model_path: os.path, prefix: str):
41-
frameworks = {'tf', 'tf2', 'caffe', 'onnx', 'mxnet', 'paddle', 'kaldi'}
41+
frameworks = {'tf', 'tf2', 'caffe', 'onnx', 'paddle', 'kaldi'}
4242
precisions = {'FP16', 'FP32', 'INT8', 'INT1'}
4343
# remove share path + model.xml
4444
model_path = model_path.replace('\n', '')

tools/constraints.txt

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# files because the version differs between them:
44
# tensorflow, numpy
55
h5py>=3.1.0,<3.11.0
6-
mxnet~=1.2.0; sys_platform == 'win32'
7-
mxnet>=1.7.0.post2,<=1.9.1; sys_platform != 'win32'
86
onnx>=1.8.1,<=1.16.0
97
networkx<=3.1.0
108
pytest>=5.0,<8.4

tools/mo/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ E.g. the command below will install dependencies to support ONNX\* and TensorFlo
1818
```
1919
pip install openvino-dev[onnx,tensorflow2]
2020
```
21-
To enable support of MxNet\* models run:
22-
```
23-
pip install openvino-dev[mxnet]
24-
```
2521
To enable support of all frameworks:
2622
```
2723
pip install openvino-dev[all]

tools/mo/automation/package_BOM.txt

-112
Original file line numberDiff line numberDiff line change
@@ -252,111 +252,6 @@ openvino/tools/mo/front/LayerNorm.py
252252
openvino/tools/mo/front/Log1p.py
253253
openvino/tools/mo/front/MatMul_normalizer.py
254254
openvino/tools/mo/front/MoveEmbeddedInputsToInputs.py
255-
openvino/tools/mo/front/mxnet/__init__.py
256-
openvino/tools/mo/front/mxnet/activation.py
257-
openvino/tools/mo/front/mxnet/adaptive_avg_pooling_ext.py
258-
openvino/tools/mo/front/mxnet/add_input_data_to_prior_boxes.py
259-
openvino/tools/mo/front/mxnet/arange_ext.py
260-
openvino/tools/mo/front/mxnet/arange_like_ext.py
261-
openvino/tools/mo/front/mxnet/arange_like_replacer.py
262-
openvino/tools/mo/front/mxnet/arange_replacer.py
263-
openvino/tools/mo/front/mxnet/batch_dot_ext.py
264-
openvino/tools/mo/front/mxnet/block_grad_ext.py
265-
openvino/tools/mo/front/mxnet/box_nms_ext.py
266-
openvino/tools/mo/front/mxnet/cast_ext.py
267-
openvino/tools/mo/front/mxnet/check_softmax_node_inputs.py
268-
openvino/tools/mo/front/mxnet/clip_ext.py
269-
openvino/tools/mo/front/mxnet/conv_ext.py
270-
openvino/tools/mo/front/mxnet/copy_ext.py
271-
openvino/tools/mo/front/mxnet/crop_ext.py
272-
openvino/tools/mo/front/mxnet/cumsum.py
273-
openvino/tools/mo/front/mxnet/cumsum_ext.py
274-
openvino/tools/mo/front/mxnet/custom.py
275-
openvino/tools/mo/front/mxnet/custom_rpn_proposal.py
276-
openvino/tools/mo/front/mxnet/deformable_conv_ext.py
277-
openvino/tools/mo/front/mxnet/deformable_psroi_pooling_ext.py
278-
openvino/tools/mo/front/mxnet/div_sqrt_dim.py
279-
openvino/tools/mo/front/mxnet/dropout_ext.py
280-
openvino/tools/mo/front/mxnet/einsum_ext.py
281-
openvino/tools/mo/front/mxnet/elementwise_ext.py
282-
openvino/tools/mo/front/mxnet/eltwise_scalar_replacers.py
283-
openvino/tools/mo/front/mxnet/exp_ext.py
284-
openvino/tools/mo/front/mxnet/expand_dims_ext.py
285-
openvino/tools/mo/front/mxnet/extractor.py
286-
openvino/tools/mo/front/mxnet/extractors/__init__.py
287-
openvino/tools/mo/front/mxnet/extractors/add_n.py
288-
openvino/tools/mo/front/mxnet/extractors/batchnorm.py
289-
openvino/tools/mo/front/mxnet/extractors/concat.py
290-
openvino/tools/mo/front/mxnet/extractors/l2_normalization.py
291-
openvino/tools/mo/front/mxnet/extractors/multibox_prior.py
292-
openvino/tools/mo/front/mxnet/extractors/relu.py
293-
openvino/tools/mo/front/mxnet/extractors/scaleshift.py
294-
openvino/tools/mo/front/mxnet/extractors/slice_axis.py
295-
openvino/tools/mo/front/mxnet/extractors/utils.py
296-
openvino/tools/mo/front/mxnet/eye_ext.py
297-
openvino/tools/mo/front/mxnet/eye_mx_to_eye.py
298-
openvino/tools/mo/front/mxnet/fft_ext.py
299-
openvino/tools/mo/front/mxnet/flatten_ext.py
300-
openvino/tools/mo/front/mxnet/fully_connected_ext.py
301-
openvino/tools/mo/front/mxnet/gather.py
302-
openvino/tools/mo/front/mxnet/gather_ext.py
303-
openvino/tools/mo/front/mxnet/gluoncv_ssd_anchors.py
304-
openvino/tools/mo/front/mxnet/instance_norm_ext.py
305-
openvino/tools/mo/front/mxnet/layer_norm_ext.py
306-
openvino/tools/mo/front/mxnet/leaky_relu.py
307-
openvino/tools/mo/front/mxnet/loader.py
308-
openvino/tools/mo/front/mxnet/lrn_ext.py
309-
openvino/tools/mo/front/mxnet/max_ext.py
310-
openvino/tools/mo/front/mxnet/modulated_deformable_conv_ext.py
311-
openvino/tools/mo/front/mxnet/modulated_deformable_conv_replacer.py
312-
openvino/tools/mo/front/mxnet/multibox_detection_ext.py
313-
openvino/tools/mo/front/mxnet/mx_reshape_reverse.py
314-
openvino/tools/mo/front/mxnet/mx_reshape_to_reshape.py
315-
openvino/tools/mo/front/mxnet/MXFFTToDFT.py
316-
openvino/tools/mo/front/mxnet/MXRepeatReplacer.py
317-
openvino/tools/mo/front/mxnet/nd_to_params.py
318-
openvino/tools/mo/front/mxnet/null_ext.py
319-
openvino/tools/mo/front/mxnet/pad_ext.py
320-
openvino/tools/mo/front/mxnet/pooling_ext.py
321-
openvino/tools/mo/front/mxnet/proposal_ext.py
322-
openvino/tools/mo/front/mxnet/psroi_pooling_ext.py
323-
openvino/tools/mo/front/mxnet/random_uniform_ext.py
324-
openvino/tools/mo/front/mxnet/register_custom_ops.py
325-
openvino/tools/mo/front/mxnet/repeat_ext.py
326-
openvino/tools/mo/front/mxnet/reshape_ext.py
327-
openvino/tools/mo/front/mxnet/RNN_ext.py
328-
openvino/tools/mo/front/mxnet/rnn_param_concat.py
329-
openvino/tools/mo/front/mxnet/roi_pooling_ext.py
330-
openvino/tools/mo/front/mxnet/roll_ext.py
331-
openvino/tools/mo/front/mxnet/shape_array_ext.py
332-
openvino/tools/mo/front/mxnet/sigmoid.py
333-
openvino/tools/mo/front/mxnet/slice_channel_ext.py
334-
openvino/tools/mo/front/mxnet/slice_ext.py
335-
openvino/tools/mo/front/mxnet/slice_like_ext.py
336-
openvino/tools/mo/front/mxnet/slice_replacers.py
337-
openvino/tools/mo/front/mxnet/softmax.py
338-
openvino/tools/mo/front/mxnet/softmax_activation_ext.py
339-
openvino/tools/mo/front/mxnet/softmax_ext.py
340-
openvino/tools/mo/front/mxnet/softmax_output_ext.py
341-
openvino/tools/mo/front/mxnet/softsign_ext.py
342-
openvino/tools/mo/front/mxnet/squeeze_ext.py
343-
openvino/tools/mo/front/mxnet/ssd_anchor_reshape.py
344-
openvino/tools/mo/front/mxnet/ssd_detection_output_replacer.py
345-
openvino/tools/mo/front/mxnet/ssd_pattern_flatten_softmax_activation.py
346-
openvino/tools/mo/front/mxnet/ssd_pattern_remove_flatten.py
347-
openvino/tools/mo/front/mxnet/ssd_pattern_remove_reshape.py
348-
openvino/tools/mo/front/mxnet/ssd_pattern_remove_transpose.py
349-
openvino/tools/mo/front/mxnet/ssd_reorder_detection_out_inputs.py
350-
openvino/tools/mo/front/mxnet/stack_ext.py
351-
openvino/tools/mo/front/mxnet/swapaxis_ext.py
352-
openvino/tools/mo/front/mxnet/take_ext.py
353-
openvino/tools/mo/front/mxnet/tile_ext.py
354-
openvino/tools/mo/front/mxnet/tile_replacer.py
355-
openvino/tools/mo/front/mxnet/transpose_ext.py
356-
openvino/tools/mo/front/mxnet/up_sampling_ext.py
357-
openvino/tools/mo/front/mxnet/where_ext.py
358-
openvino/tools/mo/front/mxnet/yolo_v3_mobilenet1_voc.json
359-
openvino/tools/mo/front/mxnet/zeros_ext.py
360255
openvino/tools/mo/front/no_op_eraser.py
361256
openvino/tools/mo/front/non_max_suppression_normalize.py
362257
openvino/tools/mo/front/OneHotDepthNormalizer.py
@@ -692,16 +587,13 @@ openvino/tools/mo/load/caffe/loader.py
692587
openvino/tools/mo/load/kaldi/__init__.py
693588
openvino/tools/mo/load/kaldi/loader.py
694589
openvino/tools/mo/load/loader.py
695-
openvino/tools/mo/load/mxnet/__init__.py
696-
openvino/tools/mo/load/mxnet/loader.py
697590
openvino/tools/mo/load/onnx/__init__.py
698591
openvino/tools/mo/load/onnx/loader.py
699592
openvino/tools/mo/load/tf/__init__.py
700593
openvino/tools/mo/load/tf/loader.py
701594
openvino/tools/mo/main.py
702595
openvino/tools/mo/main_caffe.py
703596
openvino/tools/mo/main_kaldi.py
704-
openvino/tools/mo/main_mxnet.py
705597
openvino/tools/mo/main_onnx.py
706598
openvino/tools/mo/main_paddle.py
707599
openvino/tools/mo/main_tf.py
@@ -827,7 +719,6 @@ openvino/tools/mo/middle/UselessSplitEraser.py
827719
openvino/tools/mo/mo.py
828720
openvino/tools/mo/mo_caffe.py
829721
openvino/tools/mo/mo_kaldi.py
830-
openvino/tools/mo/mo_mxnet.py
831722
openvino/tools/mo/mo_onnx.py
832723
openvino/tools/mo/mo_paddle.py
833724
openvino/tools/mo/mo_tf.py
@@ -845,7 +736,6 @@ openvino/tools/mo/ops/__init__.py
845736
openvino/tools/mo/ops/activation.py
846737
openvino/tools/mo/ops/activation_ops.py
847738
openvino/tools/mo/ops/adaptive_avg_pooling.py
848-
openvino/tools/mo/ops/arange_like.py
849739
openvino/tools/mo/ops/argmax.py
850740
openvino/tools/mo/ops/argmin.py
851741
openvino/tools/mo/ops/assert_op.py
@@ -882,7 +772,6 @@ openvino/tools/mo/ops/dequantize_linear.py
882772
openvino/tools/mo/ops/detection_output_onnx.py
883773
openvino/tools/mo/ops/DetectionOutput.py
884774
openvino/tools/mo/ops/dft.py
885-
openvino/tools/mo/ops/div_sqrt_dim.py
886775
openvino/tools/mo/ops/dropoutmask.py
887776
openvino/tools/mo/ops/einsum.py
888777
openvino/tools/mo/ops/elementwise.py
@@ -932,7 +821,6 @@ openvino/tools/mo/ops/multinomial.py
932821
openvino/tools/mo/ops/mvn.py
933822
openvino/tools/mo/ops/mxfft.py
934823
openvino/tools/mo/ops/mxrepeat.py
935-
openvino/tools/mo/ops/mxreshape.py
936824
openvino/tools/mo/ops/NextIteration.py
937825
openvino/tools/mo/ops/nms_rotated.py
938826
openvino/tools/mo/ops/non_max_suppression.py

tools/mo/openvino/tools/mo/analysis/inputs.py

-18
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ def fifo_queue_analysis(cls, graph: Graph, inputs_desc: dict):
3737
'data_type': fifo_queue.types[port_ind]}
3838
return inputs_to_ignore
3939

40-
@classmethod
41-
def ignore_mxnet_softmax_inputs(cls, graph: Graph):
42-
"""
43-
MxNet Softmax layers may have additional inputs which should be ignored. Refer to the
44-
openvino/tools/mo/front/mxnet/check_softmax_node_inputs.py.
45-
"""
46-
inputs_to_ignore = set()
47-
softmax_nodes = []
48-
[softmax_nodes.extend(graph.get_op_nodes(op=op)) for op in ('SoftMax', 'SoftmaxActivation', 'SoftmaxOutput')]
49-
for softmax_node in softmax_nodes:
50-
for i in range(1, len(softmax_node.in_nodes())):
51-
if softmax_node.in_node(i).has_valid('op') and softmax_node.in_node(i).op == 'Parameter':
52-
inputs_to_ignore.add(softmax_node.in_node(i).id)
53-
return inputs_to_ignore
54-
5540
@classmethod
5641
def iterator_get_next_analysis(cls, graph: Graph, inputs_desc: dict):
5742
message = None
@@ -80,9 +65,6 @@ def analyze(self, graph: Graph):
8065
inputs_desc = dict()
8166
message = InputsAnalysis.iterator_get_next_analysis(graph, inputs_desc)
8267
inputs_to_ignore = InputsAnalysis.fifo_queue_analysis(graph, inputs_desc)
83-
if graph.graph['fw'] == 'mxnet':
84-
inputs_to_ignore.update(InputsAnalysis.ignore_mxnet_softmax_inputs(graph))
85-
8668
inputs = graph.get_op_nodes(op='Parameter')
8769
for input in inputs:
8870
inputs_desc[input.name] = {'shape': input.soft_get('shape', None),

0 commit comments

Comments
 (0)