onnx2tf 1.27.6__py3-none-any.whl → 1.27.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
onnx2tf/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from onnx2tf.onnx2tf import convert, main
2
2
 
3
- __version__ = '1.27.6'
3
+ __version__ = '1.27.7'
onnx2tf/onnx2tf.py CHANGED
@@ -1947,6 +1947,8 @@ def convert(
1947
1947
  validated_onnx_tensor: np.ndarray = checked_value[0]
1948
1948
  matched_flg: int = checked_value[1]
1949
1949
  max_abs_err: Any = checked_value[2]
1950
+ onnx_shape_tf_shape: str = checked_value[3]
1951
+
1950
1952
  message = ''
1951
1953
  if matched_flg == 0:
1952
1954
  message = \
@@ -1960,11 +1962,11 @@ def convert(
1960
1962
  elif matched_flg == 2:
1961
1963
  message = \
1962
1964
  Color.GREEN(f'validate_result') + ': ' +\
1963
- Color.REVERSE(f'{Color.BLUE} Skipped (Deleted or Shape Unmatched) ')
1965
+ Color.REVERSE(f'{Color.BLUE} Skipped (Deleted or Shape Unmatched) {onnx_shape_tf_shape}')
1964
1966
  print(
1965
1967
  Color.GREEN(f'INFO:') + ' '+
1966
- Color.GREEN(f'onnx_output_name') + f': {onnx_output_name} '+
1967
- Color.GREEN(f'tf_output_name') + f': {tf_output_name} '+
1968
+ Color.GREEN(f'onnx_output_name') + f': {re.sub("^wa/", "/", onnx_output_name)} '+
1969
+ # Color.GREEN(f'tf_output_name') + f': {tf_output_name} '+
1968
1970
  Color.GREEN(f'shape') + f': {validated_onnx_tensor.shape} '+
1969
1971
  Color.GREEN(f'dtype') + f': {validated_onnx_tensor.dtype} '+
1970
1972
  f'{message}'
@@ -1,6 +1,7 @@
1
1
  import math
2
2
  import os
3
3
  import io
4
+ import re
4
5
  import sys
5
6
  import copy
6
7
  import json
@@ -280,7 +281,7 @@ def print_node_info(func):
280
281
  if graph_input is not None:
281
282
  debug(
282
283
  Color.GREEN(f'INFO:') + ' '+
283
- Color.GREEN(f'input_op_name') + f': {graph_input.name} '+
284
+ Color.GREEN(f'input_op_name') + f': {re.sub("^wa/", "/", graph_input.name)} '+
284
285
  Color.GREEN(f'shape') + f': {graph_input.shape} '+
285
286
  Color.GREEN(f'dtype') + f': {graph_input.dtype}'
286
287
  )
@@ -294,18 +295,18 @@ def print_node_info(func):
294
295
  )
295
296
  debug(
296
297
  Color.GREEN(f'INFO:') + ' ' + Color.MAGENTA(f'onnx_op_type') + ': '+
297
- f'{graph_node.op}' + Color.MAGENTA(' onnx_op_name') + f': {graph_node.name}')
298
+ f'{graph_node.op}' + Color.MAGENTA(' onnx_op_name') + f': {re.sub("^wa/", "/", graph_node.name)}')
298
299
  for idx, graph_node_input in enumerate(graph_node.inputs):
299
300
  debug(
300
301
  Color.GREEN(f'INFO:') + ' '+
301
- Color.CYAN(f' input_name.{idx+1}') + f': {graph_node_input.name} '+
302
+ Color.CYAN(f' input_name.{idx+1}') + f': {re.sub("^wa/", "/", graph_node_input.name)} '+
302
303
  Color.CYAN(f'shape') + f': {graph_node_input.shape} '+
303
304
  Color.CYAN(f'dtype') + f': {graph_node_input.dtype}'
304
305
  )
305
306
  for idx, graph_node_output in enumerate(graph_node.outputs):
306
307
  debug(
307
308
  Color.GREEN(f'INFO:') + ' '+
308
- Color.CYAN(f' output_name.{idx+1}') + f': {graph_node_output.name} '+
309
+ Color.CYAN(f' output_name.{idx+1}') + f': {re.sub("^wa/", "/", graph_node_output.name)} '+
309
310
  Color.CYAN(f'shape') + f': {graph_node_output.shape} '+
310
311
  Color.CYAN(f'dtype') + f': {graph_node_output.dtype}'
311
312
  )
@@ -4033,18 +4034,19 @@ def onnx_tf_tensor_validation(
4033
4034
 
4034
4035
  Returns
4035
4036
  ----------
4036
- check_results: Dict[str, List[np.ndarray, int, float|int]]
4037
+ check_results: Dict[str, List[np.ndarray, int, float|int], str]
4037
4038
  Tensor Comparison Results
4038
4039
  {
4039
4040
  onnx_output_name: [
4040
4041
  onnx_tensor,
4041
4042
  matched_flg, <--- 0: Unmatched, 1: Matched, 2: Skipped (Deleted or Shape Unmatched),
4042
4043
  max_abs_err,
4044
+ onnx_shape_tf_shape,
4043
4045
  ]
4044
4046
  }
4045
4047
  """
4046
4048
  check_results = {
4047
- k: [v[0], False, 0.0] \
4049
+ k: [v[0], False, 0.0, ""] \
4048
4050
  for k, v in output_pairs.items()
4049
4051
  }
4050
4052
 
@@ -4120,9 +4122,12 @@ def onnx_tf_tensor_validation(
4120
4122
  # If there was no match between ONNX and TensorFlow output shapes.
4121
4123
  check_results[names_pair][1] = 2
4122
4124
  check_results[names_pair][2] = max_abs_err
4125
+ check_results[names_pair][3] = \
4126
+ f"onnx.shape:{onnx_tensor.shape if hasattr(onnx_tensor, 'shape') else 'None'}/tf.shape:{tf_tensor.shape if hasattr(tf_tensor, 'shape') else 'None'}"
4123
4127
  else:
4124
4128
  check_results[names_pair][1] = validate_result
4125
4129
  check_results[names_pair][2] = max_abs_err
4130
+ check_results[names_pair][3] = ""
4126
4131
 
4127
4132
  return check_results
4128
4133
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onnx2tf
3
- Version: 1.27.6
3
+ Version: 1.27.7
4
4
  Summary: Self-Created Tools to convert ONNX files (NCHW) to TensorFlow/TFLite/Keras format (NHWC). The purpose of this tool is to solve the massive Transpose extrapolation problem in onnx-tensorflow (onnx-tf).
5
5
  Home-page: https://github.com/PINTO0309/onnx2tf
6
6
  Author: Katsuya Hyodo
@@ -334,7 +334,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
334
334
  docker run --rm -it \
335
335
  -v `pwd`:/workdir \
336
336
  -w /workdir \
337
- ghcr.io/pinto0309/onnx2tf:1.27.6
337
+ ghcr.io/pinto0309/onnx2tf:1.27.7
338
338
 
339
339
  or
340
340
 
@@ -342,7 +342,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
342
342
  docker run --rm -it \
343
343
  -v `pwd`:/workdir \
344
344
  -w /workdir \
345
- docker.io/pinto0309/onnx2tf:1.27.6
345
+ docker.io/pinto0309/onnx2tf:1.27.7
346
346
 
347
347
  or
348
348
 
@@ -1,6 +1,6 @@
1
- onnx2tf/__init__.py,sha256=BRR6jLGxZsG-5DxMPDGLlQLYc4ijJHyOdt2smyK3gTc,66
1
+ onnx2tf/__init__.py,sha256=T9ZWYLI8Cr8oH2EHbgRHp0VPs8l0KxcEqAyWcOBf9fQ,66
2
2
  onnx2tf/__main__.py,sha256=2RSCQ7d4lc6CwD-rlGn9UicPFg-P5du7ZD_yh-kuBEU,57
3
- onnx2tf/onnx2tf.py,sha256=5JDNLnXV3rnWGLDQIxdiCRgxRi2HmyPAIt6KFI6AhU8,123783
3
+ onnx2tf/onnx2tf.py,sha256=KPFVEhTDBhX7Y-Bh7X40ZEclGf2_Vfp9-M9AMPqOywI,123892
4
4
  onnx2tf/ops/Abs.py,sha256=V7btmCG_ZvK_qJovUsguq0ZMJ349mhNQ4FHSgzP_Yuo,4029
5
5
  onnx2tf/ops/Acos.py,sha256=Fo8YkFKuWq8Fi2xUrBdKcAH1yJ8r5pjSD0wgLttTNdk,4003
6
6
  onnx2tf/ops/Acosh.py,sha256=ATQj2cT5JS_mTfXi0kXqJ1yzSZu5J0zHA5VjV3j7uKY,3588
@@ -185,13 +185,13 @@ onnx2tf/ops/_Loop.py,sha256=eo5sNfrfOnKV6_I737AWsM5LJTY9DVOxQEvhanxtP4g,11322
185
185
  onnx2tf/ops/__Loop.py,sha256=ClwMcbNS4hqUtW_pzwjMa9Cqg7ONvz9aplke55A0uJ0,19704
186
186
  onnx2tf/ops/__init__.py,sha256=jnmUWWa-3dHzBZV9bmPzXu6eoz2dumJTzO7i8JdcgSM,25
187
187
  onnx2tf/utils/__init__.py,sha256=E9FM9He68VIASDnYp-OrxvHFVn55GzWqw2OEkCqn1zg,27
188
- onnx2tf/utils/common_functions.py,sha256=HTDca3DGXB3xvc1S50RNscgB57TCiq4yC5Nrafs6ka4,241430
188
+ onnx2tf/utils/common_functions.py,sha256=TXvZ7qg9stD1qKvbtkoE70jRxojdtdQhhHIoYaM0I1E,241826
189
189
  onnx2tf/utils/enums.py,sha256=7c5TqetqB07VjyHoxJHfLgtqBqk9ZRyUF33fPOJR1IM,1649
190
190
  onnx2tf/utils/logging.py,sha256=yUCmPuJ_XiUItM3sZMcaMO24JErkQy7zZwVTYWAuiKg,1982
191
- onnx2tf-1.27.6.dist-info/licenses/LICENSE,sha256=5v_Kxihy8i6mzHVl349ikSREaIdsl9YeUnX1KBDLD2w,1070
192
- onnx2tf-1.27.6.dist-info/licenses/LICENSE_onnx-tensorflow,sha256=gK4GtS9S5YcyINu6uuNNWdo-kBClyEM4MFLFGiNTeRM,11231
193
- onnx2tf-1.27.6.dist-info/METADATA,sha256=zRB3pV3IdIZiGY0JT04-jx9Ydf4Ywr547T_E0G0jX4o,147712
194
- onnx2tf-1.27.6.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
195
- onnx2tf-1.27.6.dist-info/entry_points.txt,sha256=gDPK8ToCFPKMvm8jr9xrGOkXtORJJVh4736fBEKO5k0,41
196
- onnx2tf-1.27.6.dist-info/top_level.txt,sha256=WgfPiEy3f6vZ_FOpAIEA2CF3TCx1eYrhGw93Ih6b9Fw,8
197
- onnx2tf-1.27.6.dist-info/RECORD,,
191
+ onnx2tf-1.27.7.dist-info/licenses/LICENSE,sha256=5v_Kxihy8i6mzHVl349ikSREaIdsl9YeUnX1KBDLD2w,1070
192
+ onnx2tf-1.27.7.dist-info/licenses/LICENSE_onnx-tensorflow,sha256=gK4GtS9S5YcyINu6uuNNWdo-kBClyEM4MFLFGiNTeRM,11231
193
+ onnx2tf-1.27.7.dist-info/METADATA,sha256=83NqwMo1_sVzH1VVUyzVhh_0QT5rSg2m4LfoP3VDrZo,147712
194
+ onnx2tf-1.27.7.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
195
+ onnx2tf-1.27.7.dist-info/entry_points.txt,sha256=gDPK8ToCFPKMvm8jr9xrGOkXtORJJVh4736fBEKO5k0,41
196
+ onnx2tf-1.27.7.dist-info/top_level.txt,sha256=WgfPiEy3f6vZ_FOpAIEA2CF3TCx1eYrhGw93Ih6b9Fw,8
197
+ onnx2tf-1.27.7.dist-info/RECORD,,