Skip to content

Commit

Permalink
Merge pull request #621 from PINTO0309/pixcel_unshuffle
Browse files Browse the repository at this point in the history
Optimization of `torch.nn.PixelUnshuffle`
  • Loading branch information
PINTO0309 authored May 5, 2024
2 parents dc87588 + 1537586 commit 4207e99
Show file tree
Hide file tree
Showing 15 changed files with 550 additions and 422 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ Video speed is adjusted approximately 50 times slower than actual speed.
docker run --rm -it \
-v `pwd`:/workdir \
-w /workdir \
ghcr.io/pinto0309/onnx2tf:1.20.6
ghcr.io/pinto0309/onnx2tf:1.20.7

or

# Authentication is not required for pulls from Docker Hub.
docker run --rm -it \
-v `pwd`:/workdir \
-w /workdir \
docker.io/pinto0309/onnx2tf:1.20.6
docker.io/pinto0309/onnx2tf:1.20.7

or

Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from onnx2tf.onnx2tf import convert, main

__version__ = '1.20.6'
__version__ = '1.20.7'
1 change: 1 addition & 0 deletions onnx2tf/onnx2tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ def sanitizing(node):
'output_nms_with_dynamic_tensor': output_nms_with_dynamic_tensor,
'output_integer_quantized_tflite': output_integer_quantized_tflite,
'gelu_replace_op_names': {},
'space_to_depth_replace_op_names': {},
'relu_relu6_merge_op_names': {},
'mul_div_replace_op_names': {},
'use_cuda': use_cuda,
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceL1.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceL2.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceLogSum.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceLogSumExp.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceMax.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceMean.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceMin.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceProd.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceSum.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/ops/ReduceSumSquare.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def make_node(
del onnx_tensor_infos_for_validation

if not disable_strict_mode:
if onnx_tensor_infos is not None and validation_data is not None:
if onnx_tensor_infos is not None and validation_data is not None and axes is not None:
# Shape Unmatch Error Mitigation Measures
# Search for and transpose shapes that do not cause shape unmatch errors
min_abs_err = sys.maxsize
Expand Down
Loading

0 comments on commit 4207e99

Please sign in to comment.