Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: for tf 1.x & tf 2.x #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hirahara-taiki
Copy link

It can now be saved in SavedModel format for conversion to ONNX or TensorRT.

@gordanLiang
Copy link

It can now be saved in SavedModel format for conversion to ONNX or TensorRT.
can you teach me how to replace the current WHEnet(using tensorflow1.12.0)?

@shijh
Copy link

shijh commented Jan 17, 2022

@hirahara-taiki excellent work. great appreciations!!!

I tested whenettf.py on python 3.8.10, tensorflow 2.3.4 on Windows 10 and works charmly. I used keras2onnx to save model to onnx format and load/test the onnx model with the 2 images under Sample folder, exact same results as h5's.

@gordinmitya
Copy link

thnx a lot!

with latest TF version (2.8.0) and python (3.9.7) I did:

from whenettf2 import WHENet
model = WHENet('WHENet.h5')
model.save('whened_sm')

and then

python -m tf2onnx.convert --opset 13 \
    --saved-model whenet_sm \
    --output whenet.onnx

otherwise I failed to convert original model even with old tf and python==3.6
zipped whenet.onnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants