onnx2tf 1.26.6__py3-none-any.whl → 1.26.8__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 +1 -1
- onnx2tf/ops/DequantizeLinear.py +3 -1
- onnx2tf/ops/GatherElements.py +2 -1
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/METADATA +13 -5
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/RECORD +10 -10
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/LICENSE +0 -0
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/LICENSE_onnx-tensorflow +0 -0
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/WHEEL +0 -0
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/entry_points.txt +0 -0
- {onnx2tf-1.26.6.dist-info → onnx2tf-1.26.8.dist-info}/top_level.txt +0 -0
onnx2tf/__init__.py
CHANGED
onnx2tf/ops/DequantizeLinear.py
CHANGED
|
@@ -101,12 +101,14 @@ def make_node(
|
|
|
101
101
|
|
|
102
102
|
# Reshape process is needed for per-axis dequantization
|
|
103
103
|
# when scale is a 1-D tensor
|
|
104
|
-
if x_scale_rank == 1:
|
|
104
|
+
if x_scale_rank == 1 and x_scale_shape[0] != 1:
|
|
105
105
|
shape_broadcast = list([1 for _ in range(axis)] + [input_tensor_shape[axis]] + [1 for _ in range(axis + 1, input_tensor_rank)])
|
|
106
106
|
x_scale = tf.reshape(
|
|
107
107
|
tensor=x_scale,
|
|
108
108
|
shape=shape_broadcast,
|
|
109
109
|
)
|
|
110
|
+
elif x_scale_rank == 1 and x_scale_shape[0] == 1:
|
|
111
|
+
shape_broadcast = [1 for i in range(input_tensor_rank)]
|
|
110
112
|
|
|
111
113
|
subed_tensor = input_tensor
|
|
112
114
|
if len(graph_node.inputs) >= 3 and input_tensor.dtype != tf.int32:
|
onnx2tf/ops/GatherElements.py
CHANGED
|
@@ -184,7 +184,8 @@ def make_node(
|
|
|
184
184
|
tf_layers_dict=tf_layers_dict,
|
|
185
185
|
)
|
|
186
186
|
val_model = None
|
|
187
|
-
if not isinstance(input_tensor, np.ndarray)
|
|
187
|
+
if not isinstance(input_tensor, np.ndarray) \
|
|
188
|
+
and not hasattr(input_tensor, "numpy"):
|
|
188
189
|
val_model = tf_keras.Model(
|
|
189
190
|
inputs=tf_model_inputs,
|
|
190
191
|
outputs=[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: onnx2tf
|
|
3
|
-
Version: 1.26.
|
|
3
|
+
Version: 1.26.8
|
|
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
|
|
@@ -289,14 +289,22 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
289
289
|
- psutil==5.9.5
|
|
290
290
|
- ml_dtypes==0.3.2
|
|
291
291
|
- flatbuffers-compiler (Optional, Only when using the `-coion` option. Executable file named `flatc`.)
|
|
292
|
-
- flatbuffers>=23.
|
|
292
|
+
- flatbuffers>=23.1.21
|
|
293
293
|
```bash
|
|
294
|
-
# Custom flatc
|
|
294
|
+
# Custom flatc binary for Ubuntu 22.04+
|
|
295
295
|
# https://github.com/PINTO0309/onnx2tf/issues/196
|
|
296
|
+
|
|
297
|
+
# x86_64/amd64 v23.5.26
|
|
296
298
|
wget https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz \
|
|
297
299
|
&& tar -zxvf flatc.tar.gz \
|
|
298
300
|
&& sudo chmod +x flatc \
|
|
299
301
|
&& sudo mv flatc /usr/bin/
|
|
302
|
+
|
|
303
|
+
# arm64 v23.1.21
|
|
304
|
+
wget https://github.com/PINTO0309/onnx2tf/releases/download/1.26.6/flatc_arm64.tar.gz \
|
|
305
|
+
&& tar -zxvf flatc_arm64.tar.gz \
|
|
306
|
+
&& sudo chmod +x flatc \
|
|
307
|
+
&& sudo mv flatc /usr/bin/
|
|
300
308
|
```
|
|
301
309
|
|
|
302
310
|
## Sample Usage
|
|
@@ -323,7 +331,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
323
331
|
docker run --rm -it \
|
|
324
332
|
-v `pwd`:/workdir \
|
|
325
333
|
-w /workdir \
|
|
326
|
-
ghcr.io/pinto0309/onnx2tf:1.26.
|
|
334
|
+
ghcr.io/pinto0309/onnx2tf:1.26.8
|
|
327
335
|
|
|
328
336
|
or
|
|
329
337
|
|
|
@@ -331,7 +339,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
331
339
|
docker run --rm -it \
|
|
332
340
|
-v `pwd`:/workdir \
|
|
333
341
|
-w /workdir \
|
|
334
|
-
docker.io/pinto0309/onnx2tf:1.26.
|
|
342
|
+
docker.io/pinto0309/onnx2tf:1.26.8
|
|
335
343
|
|
|
336
344
|
or
|
|
337
345
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
onnx2tf/__init__.py,sha256=
|
|
1
|
+
onnx2tf/__init__.py,sha256=JmpkhYt1GTh9veBIkt7rVJ77GyAolWS783efKllAINE,66
|
|
2
2
|
onnx2tf/__main__.py,sha256=2RSCQ7d4lc6CwD-rlGn9UicPFg-P5du7ZD_yh-kuBEU,57
|
|
3
3
|
onnx2tf/onnx2tf.py,sha256=IEnfIs3Dy8Y5F3iJ4HY7bWkn3QuB6lq_gHa1q5E3tMI,124745
|
|
4
4
|
onnx2tf/ops/Abs.py,sha256=V7btmCG_ZvK_qJovUsguq0ZMJ349mhNQ4FHSgzP_Yuo,4029
|
|
@@ -33,7 +33,7 @@ onnx2tf/ops/Cos.py,sha256=0v5ZJZRzrswVEObyxf4f0RvnWMWZA4uCEdoeq_VE31s,3608
|
|
|
33
33
|
onnx2tf/ops/Cosh.py,sha256=-L3QkQtiVBJIv1sSxbXtetVIwgI_2T4WC1O4t2aJ8Gc,3585
|
|
34
34
|
onnx2tf/ops/CumSum.py,sha256=SYKmD5r9Cm9gsCkJPNFoHigvvBO1PmRYRrVmn1HE78o,3954
|
|
35
35
|
onnx2tf/ops/DepthToSpace.py,sha256=BiyBZ88dmXQAkZ5Jc-Ddo-5Kn8dRYCnoik_XnOFzqXc,14449
|
|
36
|
-
onnx2tf/ops/DequantizeLinear.py,sha256=
|
|
36
|
+
onnx2tf/ops/DequantizeLinear.py,sha256=cNbGw4ITg_BsrXYkSb7fD05XEkQgz7v__-StQtvIvB4,5220
|
|
37
37
|
onnx2tf/ops/Det.py,sha256=kxuHkpv_KNHkof0uBv2RLtr3G1uA76MFHyCiCYCBXkw,3590
|
|
38
38
|
onnx2tf/ops/Div.py,sha256=fIN90mp7ByeKWEVDVENvCMja5Qc83jstayNw9hoKP4Y,16224
|
|
39
39
|
onnx2tf/ops/Dropout.py,sha256=KZKVqlnbq875awsNvJaQRvkO3XgqxeAmjbikXymRCtA,5860
|
|
@@ -50,7 +50,7 @@ onnx2tf/ops/Floor.py,sha256=8izJrNmw8wNmjF_YabIpLs4jm82J-gKcyAQbwV7Yqpc,3589
|
|
|
50
50
|
onnx2tf/ops/FusedConv.py,sha256=gslI50V3yvt4l0mmodnyHFAu0cORx1J_ZL5cE0rZ8qs,4523
|
|
51
51
|
onnx2tf/ops/GRU.py,sha256=kBHiZlhlPIV2DQCoFYFHxCTwOATeguJy1MSfj2kxqDM,30732
|
|
52
52
|
onnx2tf/ops/Gather.py,sha256=ezsUTN8nWau4-kB696xjonlVWU6XQ6BjtyjSebt1EXg,15216
|
|
53
|
-
onnx2tf/ops/GatherElements.py,sha256=
|
|
53
|
+
onnx2tf/ops/GatherElements.py,sha256=pR9EuOkYRBKPntmnj9DYpoBESc35EGv3RHfl0HCSmao,15026
|
|
54
54
|
onnx2tf/ops/GatherND.py,sha256=sdHaBeY2ycN9gRc_ahaZo2QI9XbV8PBthefm-JPiPnE,7642
|
|
55
55
|
onnx2tf/ops/Gelu.py,sha256=ms9oHnESOuiIPxl_8YU2WEnQo_BVKRPKo5UJsvsWyEA,4321
|
|
56
56
|
onnx2tf/ops/Gemm.py,sha256=8vGtXwx_V59JIDh3EBPuFVQSbIVql45zEHUlVGV3coU,7587
|
|
@@ -188,10 +188,10 @@ onnx2tf/utils/__init__.py,sha256=E9FM9He68VIASDnYp-OrxvHFVn55GzWqw2OEkCqn1zg,27
|
|
|
188
188
|
onnx2tf/utils/common_functions.py,sha256=lhhWuNVDwM_mVFc9DD2kYcYEyyT46CDlJMvZzi9KWD4,241473
|
|
189
189
|
onnx2tf/utils/enums.py,sha256=7c5TqetqB07VjyHoxJHfLgtqBqk9ZRyUF33fPOJR1IM,1649
|
|
190
190
|
onnx2tf/utils/logging.py,sha256=yUCmPuJ_XiUItM3sZMcaMO24JErkQy7zZwVTYWAuiKg,1982
|
|
191
|
-
onnx2tf-1.26.
|
|
192
|
-
onnx2tf-1.26.
|
|
193
|
-
onnx2tf-1.26.
|
|
194
|
-
onnx2tf-1.26.
|
|
195
|
-
onnx2tf-1.26.
|
|
196
|
-
onnx2tf-1.26.
|
|
197
|
-
onnx2tf-1.26.
|
|
191
|
+
onnx2tf-1.26.8.dist-info/LICENSE,sha256=5v_Kxihy8i6mzHVl349ikSREaIdsl9YeUnX1KBDLD2w,1070
|
|
192
|
+
onnx2tf-1.26.8.dist-info/LICENSE_onnx-tensorflow,sha256=gK4GtS9S5YcyINu6uuNNWdo-kBClyEM4MFLFGiNTeRM,11231
|
|
193
|
+
onnx2tf-1.26.8.dist-info/METADATA,sha256=C3jELB9wU7bG2S4qAWIebTQHAJ8a_rUn_-HSLfIxUY4,147499
|
|
194
|
+
onnx2tf-1.26.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
195
|
+
onnx2tf-1.26.8.dist-info/entry_points.txt,sha256=gDPK8ToCFPKMvm8jr9xrGOkXtORJJVh4736fBEKO5k0,41
|
|
196
|
+
onnx2tf-1.26.8.dist-info/top_level.txt,sha256=WgfPiEy3f6vZ_FOpAIEA2CF3TCx1eYrhGw93Ih6b9Fw,8
|
|
197
|
+
onnx2tf-1.26.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|