onnx2tf 1.25.8__py3-none-any.whl → 1.25.10__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/Flatten.py +14 -2
- onnx2tf/utils/common_functions.py +14 -7
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/METADATA +3 -3
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/RECORD +10 -10
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/WHEEL +1 -1
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/LICENSE +0 -0
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/LICENSE_onnx-tensorflow +0 -0
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/entry_points.txt +0 -0
- {onnx2tf-1.25.8.dist-info → onnx2tf-1.25.10.dist-info}/top_level.txt +0 -0
onnx2tf/__init__.py
CHANGED
onnx2tf/ops/Flatten.py
CHANGED
|
@@ -87,8 +87,20 @@ def make_node(
|
|
|
87
87
|
cal_shape = (1, -1)
|
|
88
88
|
elif axis >= input_tensor_rank:
|
|
89
89
|
cal_shape = (-1, 1)
|
|
90
|
-
elif graph_node_output.shape is not None
|
|
91
|
-
|
|
90
|
+
elif graph_node_output.shape is not None \
|
|
91
|
+
and len(graph_node_output.shape) == 2 \
|
|
92
|
+
and axis == input_tensor_rank - 1 \
|
|
93
|
+
and not isinstance(graph_node_output.shape[0], str):
|
|
94
|
+
cal_shape = (graph_node_output.shape[0], -1)
|
|
95
|
+
elif graph_node_output.shape is not None \
|
|
96
|
+
and len(graph_node_output.shape) == 2 \
|
|
97
|
+
and axis == input_tensor_rank - 1 \
|
|
98
|
+
and isinstance(graph_node_output.shape[0], str):
|
|
99
|
+
try:
|
|
100
|
+
dim_prod = int(np.prod(graph_node_output.shape[1:]))
|
|
101
|
+
cal_shape = (-1, dim_prod)
|
|
102
|
+
except:
|
|
103
|
+
cal_shape = (1, -1)
|
|
92
104
|
elif input_tensor_rank >= 2 \
|
|
93
105
|
and input_tensor_shape[0] is None \
|
|
94
106
|
and len([idx for idx in input_tensor_shape[1:] if idx is not None]) == input_tensor_rank - 1 \
|
|
@@ -5202,7 +5202,19 @@ def merge_two_consecutive_identical_ops_into_one(
|
|
|
5202
5202
|
tf_type = tf.math.divide
|
|
5203
5203
|
|
|
5204
5204
|
elif tf_func == 'Sub':
|
|
5205
|
-
if (
|
|
5205
|
+
if isinstance(input_tensor_1, np.ndarray) or hasattr(input_tensor_1, 'numpy'):
|
|
5206
|
+
tf_layers_dict[graph_node_output.name]['tf_node'] = \
|
|
5207
|
+
tf.math.subtract(
|
|
5208
|
+
x=input_tensor_1 \
|
|
5209
|
+
if not isinstance(input_tensor_1, np.ndarray) \
|
|
5210
|
+
else tf.convert_to_tensor(input_tensor_1),
|
|
5211
|
+
y=input_tensor_2 \
|
|
5212
|
+
if not isinstance(input_tensor_2, np.ndarray) \
|
|
5213
|
+
else tf.convert_to_tensor(input_tensor_2),
|
|
5214
|
+
name=graph_node.name,
|
|
5215
|
+
)
|
|
5216
|
+
tf_type = tf.math.subtract
|
|
5217
|
+
elif (
|
|
5206
5218
|
not isinstance(graph_node_input_1, np.ndarray) \
|
|
5207
5219
|
and 'merge_sub' in tf_layers_dict[graph_node_input_1.name] \
|
|
5208
5220
|
and tf_layers_dict[graph_node_input_1.name]['merge_sub']
|
|
@@ -5411,12 +5423,7 @@ def merge_two_consecutive_identical_ops_into_one(
|
|
|
5411
5423
|
elif next_graph_node_o_op == 'Sub':
|
|
5412
5424
|
# 8. `Add` -> `Sub` to `Single-Add` : `10 + 5 - 8 -> 10 - 3`
|
|
5413
5425
|
if isinstance(next_graph_node_input_1, np.ndarray) or hasattr(next_graph_node_input_1, 'numpy'):
|
|
5414
|
-
|
|
5415
|
-
input_tensor_1 = (input_tensor_1 - next_graph_node_input_1)
|
|
5416
|
-
elif isinstance(input_tensor_2, np.ndarray) or hasattr(input_tensor_2, 'numpy'):
|
|
5417
|
-
input_tensor_2 = (input_tensor_2 - next_graph_node_input_1)
|
|
5418
|
-
tf_layers_dict[graph_node_output.name]['merge_add'] = True
|
|
5419
|
-
tf_type = tf.identity
|
|
5426
|
+
tf_type = tf.math.add
|
|
5420
5427
|
elif isinstance(next_graph_node_input_2, np.ndarray) or hasattr(next_graph_node_input_2, 'numpy'):
|
|
5421
5428
|
if isinstance(input_tensor_1, np.ndarray) or hasattr(input_tensor_1, 'numpy'):
|
|
5422
5429
|
input_tensor_1 = (input_tensor_1 - next_graph_node_input_2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: onnx2tf
|
|
3
|
-
Version: 1.25.
|
|
3
|
+
Version: 1.25.10
|
|
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
|
|
@@ -314,7 +314,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
314
314
|
docker run --rm -it \
|
|
315
315
|
-v `pwd`:/workdir \
|
|
316
316
|
-w /workdir \
|
|
317
|
-
ghcr.io/pinto0309/onnx2tf:1.25.
|
|
317
|
+
ghcr.io/pinto0309/onnx2tf:1.25.10
|
|
318
318
|
|
|
319
319
|
or
|
|
320
320
|
|
|
@@ -322,7 +322,7 @@ Video speed is adjusted approximately 50 times slower than actual speed.
|
|
|
322
322
|
docker run --rm -it \
|
|
323
323
|
-v `pwd`:/workdir \
|
|
324
324
|
-w /workdir \
|
|
325
|
-
docker.io/pinto0309/onnx2tf:1.25.
|
|
325
|
+
docker.io/pinto0309/onnx2tf:1.25.10
|
|
326
326
|
|
|
327
327
|
or
|
|
328
328
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
onnx2tf/__init__.py,sha256=
|
|
1
|
+
onnx2tf/__init__.py,sha256=1LHRsx2l2mQIIDQxnFqokQBOhqkzgY49KD3D8Gq1KIA,67
|
|
2
2
|
onnx2tf/__main__.py,sha256=2RSCQ7d4lc6CwD-rlGn9UicPFg-P5du7ZD_yh-kuBEU,57
|
|
3
3
|
onnx2tf/onnx2tf.py,sha256=v7juKPrl_0h9SQyck-Ol4B59QXWSSePVC3AUu3fmvII,122750
|
|
4
4
|
onnx2tf/ops/Abs.py,sha256=V7btmCG_ZvK_qJovUsguq0ZMJ349mhNQ4FHSgzP_Yuo,4029
|
|
@@ -45,7 +45,7 @@ onnx2tf/ops/Erf.py,sha256=ayvSp8Pr9h-VYuIiMorwOC0r9aQ4i4S1Uvaho9R6PYo,4962
|
|
|
45
45
|
onnx2tf/ops/Exp.py,sha256=MM_Osse7UbJgld2u0fGMcjniJCs40uDztuOodVUqWMU,3583
|
|
46
46
|
onnx2tf/ops/Expand.py,sha256=MGsby7IhTqKv1K-1INQPHcI5l3Wx-jjJ1FnulpCZsag,14761
|
|
47
47
|
onnx2tf/ops/EyeLike.py,sha256=VHRlr_WpIGVpZSqfjN7zWQF6XT2KjNVJnjVccxB4P6U,5877
|
|
48
|
-
onnx2tf/ops/Flatten.py,sha256=
|
|
48
|
+
onnx2tf/ops/Flatten.py,sha256=skiXNi4cbh3XRzSm8eaT1vyjQ_8GdWDMT2mf3mB4eO8,6148
|
|
49
49
|
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
|
|
@@ -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=
|
|
188
|
+
onnx2tf/utils/common_functions.py,sha256=gCpAe11EcX-gYOMu68saIpIj20pDmLld-6jybnc_0aY,240691
|
|
189
189
|
onnx2tf/utils/enums.py,sha256=7c5TqetqB07VjyHoxJHfLgtqBqk9ZRyUF33fPOJR1IM,1649
|
|
190
190
|
onnx2tf/utils/logging.py,sha256=yUCmPuJ_XiUItM3sZMcaMO24JErkQy7zZwVTYWAuiKg,1982
|
|
191
|
-
onnx2tf-1.25.
|
|
192
|
-
onnx2tf-1.25.
|
|
193
|
-
onnx2tf-1.25.
|
|
194
|
-
onnx2tf-1.25.
|
|
195
|
-
onnx2tf-1.25.
|
|
196
|
-
onnx2tf-1.25.
|
|
197
|
-
onnx2tf-1.25.
|
|
191
|
+
onnx2tf-1.25.10.dist-info/LICENSE,sha256=5v_Kxihy8i6mzHVl349ikSREaIdsl9YeUnX1KBDLD2w,1070
|
|
192
|
+
onnx2tf-1.25.10.dist-info/LICENSE_onnx-tensorflow,sha256=gK4GtS9S5YcyINu6uuNNWdo-kBClyEM4MFLFGiNTeRM,11231
|
|
193
|
+
onnx2tf-1.25.10.dist-info/METADATA,sha256=DXGvuW621kGBqw1ZSO6lNZVmnU-TltYJCjJERZ4GFDc,146191
|
|
194
|
+
onnx2tf-1.25.10.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
195
|
+
onnx2tf-1.25.10.dist-info/entry_points.txt,sha256=gDPK8ToCFPKMvm8jr9xrGOkXtORJJVh4736fBEKO5k0,41
|
|
196
|
+
onnx2tf-1.25.10.dist-info/top_level.txt,sha256=WgfPiEy3f6vZ_FOpAIEA2CF3TCx1eYrhGw93Ih6b9Fw,8
|
|
197
|
+
onnx2tf-1.25.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|