onnx2tf 1.27.3__py3-none-any.whl → 1.27.4__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.3'
3
+ __version__ = '1.27.4'
onnx2tf/ops/Reshape.py CHANGED
@@ -136,14 +136,18 @@ def make_node(
136
136
  else:
137
137
  transposed_tensor = input_tensor
138
138
  except:
139
- transposed_tensor = \
140
- transpose_with_flexing_deterrence(
141
- input_tensor=input_tensor,
142
- perm=list(perm) if perm is not None else None,
143
- output_shape=transposed_tensor_output_shape if None not in transposed_tensor_output_shape else None,
144
- name=graph_node.name,
145
- **kwargs,
146
- )
139
+ try:
140
+ transposed_tensor = \
141
+ transpose_with_flexing_deterrence(
142
+ input_tensor=input_tensor,
143
+ perm=list(perm) if perm is not None else None,
144
+ output_shape=transposed_tensor_output_shape if None not in transposed_tensor_output_shape else None,
145
+ name=graph_node.name,
146
+ **kwargs,
147
+ )
148
+ except:
149
+ transposed_tensor = input_tensor
150
+
147
151
  test_data = None
148
152
  if not isinstance(input_tensor, np.ndarray):
149
153
  if not isinstance(graph_node_input_1, np.ndarray) \
onnx2tf/ops/Resize.py CHANGED
@@ -294,14 +294,25 @@ def make_node(
294
294
  else:
295
295
  h_w_scale = scales[1:input_tensor_rank-1]
296
296
  h_w_shape = input_tensor_shape[1:input_tensor_rank-1]
297
- new_size = tf.cast(
298
- h_w_scale * tf.cast(
299
- h_w_shape,
300
- NUMPY_DTYPES_TO_TF_DTYPES[scales.dtype] \
301
- if isinstance(scales.dtype, np.dtype) else scales.dtype,
302
- ),
303
- tf.int32,
304
- )
297
+ if None not in h_w_shape:
298
+ new_size = tf.cast(
299
+ h_w_scale * tf.cast(
300
+ h_w_shape,
301
+ NUMPY_DTYPES_TO_TF_DTYPES[scales.dtype] \
302
+ if isinstance(scales.dtype, np.dtype) else scales.dtype,
303
+ ),
304
+ tf.int32,
305
+ )
306
+ else:
307
+ h_w_shape = tf.shape(input_tensor)[1:input_tensor_rank-1]
308
+ new_size = tf.cast(
309
+ h_w_scale * tf.cast(
310
+ h_w_shape,
311
+ NUMPY_DTYPES_TO_TF_DTYPES[scales.dtype] \
312
+ if isinstance(scales.dtype, np.dtype) else scales.dtype,
313
+ ),
314
+ tf.int32,
315
+ )
305
316
 
306
317
  if hasattr(new_size, '_inferred_value'):
307
318
  new_size_values = new_size._inferred_value
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onnx2tf
3
- Version: 1.27.3
3
+ Version: 1.27.4
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.3
337
+ ghcr.io/pinto0309/onnx2tf:1.27.4
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.3
345
+ docker.io/pinto0309/onnx2tf:1.27.4
346
346
 
347
347
  or
348
348
 
@@ -1,4 +1,4 @@
1
- onnx2tf/__init__.py,sha256=3DbzaMXeYK7wIGtbngwTKUwmlDhOPHtTzNNbknleFJA,66
1
+ onnx2tf/__init__.py,sha256=gmbApNBlikoE1jGydbqconZ-bEgpuCTCs_Nku2GCJfQ,66
2
2
  onnx2tf/__main__.py,sha256=2RSCQ7d4lc6CwD-rlGn9UicPFg-P5du7ZD_yh-kuBEU,57
3
3
  onnx2tf/onnx2tf.py,sha256=9g8enwecc2e0vZ3dnvE7ukZYEqsCBOo940zdauvN_-M,123738
4
4
  onnx2tf/ops/Abs.py,sha256=V7btmCG_ZvK_qJovUsguq0ZMJ349mhNQ4FHSgzP_Yuo,4029
@@ -133,8 +133,8 @@ onnx2tf/ops/ReduceProd.py,sha256=I4qqmdfr4t8i1sinuDqZrvndpw6KrpN1B7sFcjRUI9g,124
133
133
  onnx2tf/ops/ReduceSum.py,sha256=8vdqR5Qv8ui783ywa0xVuiMm3MNwRzGOD_GYFpsgPmc,12393
134
134
  onnx2tf/ops/ReduceSumSquare.py,sha256=X8OFxb5YRl6VU12i35f7Gwzegvf4mXO56dp69n2TZPs,12336
135
135
  onnx2tf/ops/Relu.py,sha256=FoCRlHmG-xI3YCPbR_7UlRDbk0Juw6N722iULONkwW0,5627
136
- onnx2tf/ops/Reshape.py,sha256=4nYvi1BK_8rHHPaFGbKJidc8eAjaN7NEG28T87VDYnQ,25507
137
- onnx2tf/ops/Resize.py,sha256=QyU4bM9BVCYng-LeBHMm0gqYrcg5epKOPRpzWVvrtNQ,19557
136
+ onnx2tf/ops/Reshape.py,sha256=_oPKYi1uSwt_aVsuAt9v127lt0aR5jnhHTzxKNEKdx0,25626
137
+ onnx2tf/ops/Resize.py,sha256=nvcp8X7daMapWgmpCsjg4ajt8EdTQCzB6xbHCqmEQ9M,20053
138
138
  onnx2tf/ops/ReverseSequence.py,sha256=W2w_fBCiUXsD28grIz4AHNIoMjYXx6b6HkgwJTVRxf8,3308
139
139
  onnx2tf/ops/RoiAlign.py,sha256=XgLdaJgsI6KX0u8tnQlVsvbpZECZp_TSnEuGR7LTaeM,8360
140
140
  onnx2tf/ops/Round.py,sha256=OHdh1G2qgZe5OWlRc-OEOM4eYaA63LAoQ6hPmmUmR6o,3588
@@ -188,10 +188,10 @@ onnx2tf/utils/__init__.py,sha256=E9FM9He68VIASDnYp-OrxvHFVn55GzWqw2OEkCqn1zg,27
188
188
  onnx2tf/utils/common_functions.py,sha256=HTDca3DGXB3xvc1S50RNscgB57TCiq4yC5Nrafs6ka4,241430
189
189
  onnx2tf/utils/enums.py,sha256=7c5TqetqB07VjyHoxJHfLgtqBqk9ZRyUF33fPOJR1IM,1649
190
190
  onnx2tf/utils/logging.py,sha256=yUCmPuJ_XiUItM3sZMcaMO24JErkQy7zZwVTYWAuiKg,1982
191
- onnx2tf-1.27.3.dist-info/licenses/LICENSE,sha256=5v_Kxihy8i6mzHVl349ikSREaIdsl9YeUnX1KBDLD2w,1070
192
- onnx2tf-1.27.3.dist-info/licenses/LICENSE_onnx-tensorflow,sha256=gK4GtS9S5YcyINu6uuNNWdo-kBClyEM4MFLFGiNTeRM,11231
193
- onnx2tf-1.27.3.dist-info/METADATA,sha256=0cg3hf1dkeJHtdzY7m19q8WBTStgnJBxW9jckrPzTC0,147712
194
- onnx2tf-1.27.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
195
- onnx2tf-1.27.3.dist-info/entry_points.txt,sha256=gDPK8ToCFPKMvm8jr9xrGOkXtORJJVh4736fBEKO5k0,41
196
- onnx2tf-1.27.3.dist-info/top_level.txt,sha256=WgfPiEy3f6vZ_FOpAIEA2CF3TCx1eYrhGw93Ih6b9Fw,8
197
- onnx2tf-1.27.3.dist-info/RECORD,,
191
+ onnx2tf-1.27.4.dist-info/licenses/LICENSE,sha256=5v_Kxihy8i6mzHVl349ikSREaIdsl9YeUnX1KBDLD2w,1070
192
+ onnx2tf-1.27.4.dist-info/licenses/LICENSE_onnx-tensorflow,sha256=gK4GtS9S5YcyINu6uuNNWdo-kBClyEM4MFLFGiNTeRM,11231
193
+ onnx2tf-1.27.4.dist-info/METADATA,sha256=PE5yD9J4QEnguJyUXPYBxr77XVSuRSRcElbqO8Rya4E,147712
194
+ onnx2tf-1.27.4.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
195
+ onnx2tf-1.27.4.dist-info/entry_points.txt,sha256=gDPK8ToCFPKMvm8jr9xrGOkXtORJJVh4736fBEKO5k0,41
196
+ onnx2tf-1.27.4.dist-info/top_level.txt,sha256=WgfPiEy3f6vZ_FOpAIEA2CF3TCx1eYrhGw93Ih6b9Fw,8
197
+ onnx2tf-1.27.4.dist-info/RECORD,,