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

Not compatible with current version of tensorflow #10

Open
vivek-dani opened this issue Feb 12, 2025 · 0 comments
Open

Not compatible with current version of tensorflow #10

vivek-dani opened this issue Feb 12, 2025 · 0 comments

Comments

@vivek-dani
Copy link

We get below error when running

#Convert with onnx-tf: from onnx_tf.backend import prepare tf_rep = prepare(onnx_model)

Libs used:
tensorflow==2.18.0
onnx==2.17.0

`

ModuleNotFoundError Traceback (most recent call last)
Cell In[2], line 2
1 #Convert with onnx-tf:
----> 2 from onnx_tf.backend import prepare
3 tf_rep = prepare(onnx_model)

File ~/Documents/projects/external/onnx-tensorflow/onnx_tf/init.py:1
----> 1 from . import backend
2 from .version import version as version

File ~/Documents/projects/external/onnx-tensorflow/onnx_tf/backend.py:28
26 from onnx_tf.common import get_unique_suffix
27 from onnx_tf.common import supports_device as common_supports_device
---> 28 from onnx_tf.common.handler_helper import get_all_backend_handlers
29 from onnx_tf.pb_wrapper import OnnxNode
30 from onnx_tf.backend_tf_module import BackendTFModule, TFModule

File ~/Documents/projects/external/onnx-tensorflow/onnx_tf/common/handler_helper.py:3
1 from onnx import defs
----> 3 from onnx_tf.handlers.backend import * # noqa
4 from onnx_tf.handlers.backend_handler import BackendHandler
5 import onnx_tf.common as common

File ~/Documents/projects/external/onnx-tensorflow/onnx_tf/handlers/backend/hardmax.py:3
1 import numpy as np
2 import tensorflow as tf
----> 3 import tensorflow_addons as tfa
5 from onnx_tf.handlers.backend_handler import BackendHandler
6 from onnx_tf.handlers.handler import onnx_op

File ~/anaconda3/envs/megpie/lib/python3.11/site-packages/tensorflow_addons/init.py:23
20 _check_tf_version()
22 # Local project imports
---> 23 from tensorflow_addons import activations
24 from tensorflow_addons import callbacks
25 from tensorflow_addons import image

File ~/anaconda3/envs/megpie/lib/python3.11/site-packages/tensorflow_addons/activations/init.py:17
1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
13 # limitations under the License.
14 # ==============================================================================
15 """Additional activation functions."""
---> 17 from tensorflow_addons.activations.gelu import gelu
18 from tensorflow_addons.activations.hardshrink import hardshrink
19 from tensorflow_addons.activations.lisht import lisht

File ~/anaconda3/envs/megpie/lib/python3.11/site-packages/tensorflow_addons/activations/gelu.py:19
16 import tensorflow as tf
17 import warnings
---> 19 from tensorflow_addons.utils.types import TensorLike
22 @tf.keras.utils.register_keras_serializable(package="Addons")
23 def gelu(x: TensorLike, approximate: bool = True) -> tf.Tensor:
24 r"""Gaussian Error Linear Unit.
25
26 Computes gaussian error linear:
(...)
65 A Tensor. Has the same type as x.
66 """

File ~/anaconda3/envs/megpie/lib/python3.11/site-packages/tensorflow_addons/utils/types.py:29
25 # TODO: Remove once tensorflow/tensorflow#44613 is resolved
26 if Version(tf.version).release >= Version("2.13").release:
27 # New versions of Keras require importing from keras.src when
28 # importing internal symbols.
---> 29 from keras.src.engine import keras_tensor
30 elif Version(tf.version).release >= Version("2.5").release:
31 from keras.engine import keras_tensor

ModuleNotFoundError: No module named 'keras.src.engine'
`

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

1 participant