Skip to content

Commit

Permalink
Merge 7eabfc4 into babc093
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed Apr 17, 2024
2 parents babc093 + 7eabfc4 commit 2c1f4a7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test-models.yml
Expand Up @@ -97,14 +97,15 @@ jobs:
pip install cmake==3.26.4
pip install psutil==5.9.5
pip install onnx==1.15.0
pip install tensorflow==2.15.0
pip install tensorflow==2.16.1
pip install nvidia-pyindex
pip install onnx-graphsurgeon
pip install protobuf==3.20.3
pip install onnxsim==0.4.33
pip install sng4onnx
pip install onnxruntime==1.17.1
pip install ml_dtypes==0.2.0
pip install ml_dtypes==0.3.2
pip install tf-keras~=2.16
pip install -e .
- name: Download models
run: |
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Expand Up @@ -19,12 +19,13 @@ RUN pip install pip -U \
&& pip install onnx2tf \
&& pip install onnx2tf \
&& pip install simple_onnx_processing_tools \
&& pip install tensorflow==2.15.0 \
&& pip install tensorflow==2.16.1 \
&& pip install protobuf==3.20.3 \
&& pip install h5py==3.7.0 \
&& pip install h5py==3.11.0 \
&& pip install psutil==5.9.5 \
&& pip install onnxruntime==1.17.1 \
&& pip install ml_dtypes==0.2.0
&& pip install ml_dtypes==0.3.2 \
&& pip install tf-keras~=2.16

# Re-release flatc with some customizations of our own to address
# the lack of arithmetic precision of the quantization parameters
Expand Down
22 changes: 12 additions & 10 deletions README.md
Expand Up @@ -224,9 +224,9 @@ Video speed is adjusted approximately 50 times slower than actual speed.
- onnx-simplifier==0.4.33 or 0.4.30 `(onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] (op_type:Slice, node name: /xxxx/Slice): [ShapeInferenceError] Inferred shape and existing shape differ in rank: (x) vs (y))`
- onnx_graphsurgeon
- simple_onnx_processing_tools
- tensorflow==2.15.0, Note: [#515](https://github.com/PINTO0309/onnx2tf/issues/515), Special bugs: [#436](https://github.com/PINTO0309/onnx2tf/issues/436)
- tensorflow==2.16.1, Note: [#515](https://github.com/PINTO0309/onnx2tf/issues/515), Special bugs: [#436](https://github.com/PINTO0309/onnx2tf/issues/436)
- psutil==5.9.5
- ml_dtypes==0.2.0
- ml_dtypes==0.3.2
- flatbuffers-compiler (Optional, Only when using the `-coion` option. Executable file named `flatc`.)
```bash
# Custom flatc v23.5.26 binary for Ubuntu 20.04+
Expand Down Expand Up @@ -257,15 +257,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.19.16
ghcr.io/pinto0309/onnx2tf:1.20.0

or

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

or

Expand All @@ -275,12 +275,13 @@ Video speed is adjusted approximately 50 times slower than actual speed.
&& pip install -U onnxruntime==1.17.1 \
&& pip install -U onnxsim==0.4.33 \
&& pip install -U simple_onnx_processing_tools \
&& pip install -U tensorflow==2.15.0 \
&& pip install -U tensorflow==2.16.1 \
&& pip install -U protobuf==3.20.3 \
&& pip install -U onnx2tf \
&& pip install -U h5py==3.7.0 \
&& pip install -U h5py==3.11.0 \
&& pip install -U psutil==5.9.5 \
&& pip install -U ml_dtypes==0.2.0
&& pip install -U ml_dtypes==0.3.2 \
&& pip install -U tf-keras~=2.16

or

Expand All @@ -299,7 +300,7 @@ or
&& sudo chmod +x flatc \
&& sudo mv flatc /usr/bin/
!pip install -U pip \
&& pip install tensorflow==2.15.0.post1 \
&& pip install tensorflow==2.16.1 \
&& pip install -U onnx==1.15.0 \
&& python -m pip install onnx_graphsurgeon \
--index-url https://pypi.ngc.nvidia.com \
Expand All @@ -308,9 +309,10 @@ or
&& pip install -U simple_onnx_processing_tools \
&& pip install -U onnx2tf \
&& pip install -U protobuf==3.20.3 \
&& pip install -U h5py==3.7.0 \
&& pip install -U h5py==3.11.0 \
&& pip install -U psutil==5.9.5 \
&& pip install -U ml_dtypes==0.2.0
&& pip install -U ml_dtypes==0.3.2 \
&& pip install -U tf-keras~=2.16
```

### 2. Run test
Expand Down
2 changes: 1 addition & 1 deletion onnx2tf/__init__.py
@@ -1,3 +1,3 @@
from onnx2tf.onnx2tf import convert, main

__version__ = '1.19.16'
__version__ = '1.20.0'
1 change: 1 addition & 0 deletions onnx2tf/onnx2tf.py
Expand Up @@ -22,6 +22,7 @@
import numpy as np
np.random.seed(0)
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
os.environ["TF_USE_LEGACY_KERAS"] = '1'
import tensorflow as tf
tf.random.set_seed(0)
tf.keras.utils.set_random_seed(0)
Expand Down

0 comments on commit 2c1f4a7

Please sign in to comment.