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

NotImplementedError: BatchNormalization version 9 is not implemented. #358

Closed
lookup1980 opened this issue Jan 22, 2019 · 14 comments
Closed
Assignees

Comments

@lookup1980
Copy link

lookup1980 commented Jan 22, 2019

Describe the bug

I got an error when converting a model to TensorFlow.

To Reproduce

What I am doing is:

  1. A PyTorch model is converted to ONNX model (PyTorch version is 1.0.0 GPU version):
    torch.onnx.export(model, img, "model.onnx", verbose=True)

  2. Loaded the ONNX model and verified it:
    onnx.checker.check_model(model)

  3. ONNX model is converted to TensorFlow model:
    onnx-tf convert -t tf -i model.onnx -o model.pb

The error message is:
NotImplementedError: BatchNormalization version 9 is not implemented.

ONNX model file

Can't share the model.

Python, ONNX, ONNX-TF, Tensorflow version
Python version:
2.7.15
ONNX version:
1.3.0, pulled today and built from source
ONNX-TF version:
1.2.1, pip install onnx-tf
Tensorflow version:
1.12.0, GPU version

@tjingrant tjingrant self-assigned this Jan 23, 2019
@ikasnep
Copy link

ikasnep commented Jan 25, 2019

I am having the same problem on
python 3.6.6
tf 1.11.0
onnx and onnx-tf the same as above

@hyenal
Copy link

hyenal commented Jan 25, 2019

@ikasnep are you also using PyTorch 1.0.0 ? I have the same issue having saved a model in this version of Torch with tensorflow 1.5.0 and python 2.7.5.

@ikasnep
Copy link

ikasnep commented Jan 25, 2019

Yes, PyTorch 1.0.0

@shridharkini6
Copy link

Yes ,
tensorflow-gpu==1.5.0
onnx==1.4.1
python 2.7.12
onnx-tf installed from source

@tjingrant
Copy link
Collaborator

Hi, I've noticed this issue and will provide a patch to resolve in either this weekend or early next week.

@shridharkini6
Copy link

@tjingrant any updates on this...

@tjingrant
Copy link
Collaborator

@shridharkini6 it's in for review (#361), should be checked in soon.

@davidenitti
Copy link

@tjingrant thank you for the fix, is it possible to fix also Cast version 9 is not implemented.?
thanks

@tjingrant
Copy link
Collaborator

@davidenitti sure thing. Would you create another issue for tracking purpose?

@davidenitti
Copy link

davidenitti commented Jan 29, 2019

@davidenitti sure thing. Would you create another issue for tracking purpose?

sure @tjingrant , I made it here #362
thanks

@lookup1980
Copy link
Author

Tried the tip of master, and it works!
I'll close this issue.
Thank you!

@akshayy29
Copy link

Tried the tip of master, and it works!
I'll close this issue.
Thank you!

hey! what did you do? I've got the same problem.

@akshayy29
Copy link

Describe the bug

I got an error when converting a model to TensorFlow.

To Reproduce

What I am doing is:

  1. A PyTorch model is converted to ONNX model (PyTorch version is 1.0.0 GPU version):
    torch.onnx.export(model, img, "model.onnx", verbose=True)
  2. Loaded the ONNX model and verified it:
    onnx.checker.check_model(model)
  3. ONNX model is converted to TensorFlow model:
    onnx-tf convert -t tf -i model.onnx -o model.pb

The error message is:
NotImplementedError: BatchNormalization version 9 is not implemented.

ONNX model file

Can't share the model.

Python, ONNX, ONNX-TF, Tensorflow version
Python version:
2.7.15
ONNX version:
1.3.0, pulled today and built from source
ONNX-TF version:
1.2.1, pip install onnx-tf
Tensorflow version:
1.12.0, GPU version

hey! what did you do? I've got the same problem.

@jerpint
Copy link

jerpint commented May 16, 2019

I had the same problem, managed to fix it by installing from source (the fix probably isn't on pip yet).

To do this:

pip uninstall onnx-tf
cd && git clone git@github.com:onnx/onnx-tensorflow.git && cd onnx-tensorflow
pip install -e .

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

No branches or pull requests

8 participants