Try to search your question here, if you can't find : Ask Any Question Now ?

ImportError: cannot import name 'abs'

HomeCategory: stackoverflowImportError: cannot import name 'abs'
Avatarcraig asked 1 year ago

I got problem while doing object detection using tensorflow-gpu

I was follwing the youtube tutorials
:https://www.youtube.com/watch?v=Rgpfk6eYxJA

I’m trying to detect object using tensorflow-gpu with virtual environment.

I added python, cuda, tensorflow to system environment variables, and also did
make training models with labels.

I converted xml labels to csv using xml_to_csv.py.

The problem is when I try to generate tfrecord using generate_tfrecord.py, that error appear. Please help

Here’s the code

(tensorflow) C:Usersice305tensorflowmodelsresearchobject_detection>python generate_tfrecord.py --csv_input=imagestrain_labels.csv --image_dir=imagestrain --output_path=train.record
Traceback (most recent call last):
  File "generate_tfrecord.py", line 17, in <module>
    import tensorflow as tf
  File "C:Anaconda3envstensorflowlibsite-packagestensorflow__init__.py", line 22, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpython__init__.py", line 81, in <module>
    from tensorflow.python import keras
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkeras__init__.py", line 24, in <module>
    from tensorflow.python.keras import activations
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkerasactivations__init__.py", line 22, in <module>
    from tensorflow.python.keras._impl.keras.activations import elu
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkeras_implkeras__init__.py", line 21, in <module>
    from tensorflow.python.keras._impl.keras import activations
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkeras_implkerasactivations.py", line 23, in <module>
from tensorflow.python.keras._impl.keras import backend as K
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkeras_implkerasbackend.py", line 38, in <module>
    from tensorflow.python.layers import base as tf_base_layers
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonlayersbase.py", line 25, in <module>
    from tensorflow.python.keras.engine import base_layer
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkerasengine__init__.py", line 21, in <module>
    from tensorflow.python.keras.engine.base_layer import InputSpec
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkerasenginebase_layer.py", line 33, in <module>
    from tensorflow.python.keras import backend
  File "C:Anaconda3envstensorflowlibsite-packagestensorflowpythonkerasbackend__init__.py", line 22, in <module>
    from tensorflow.python.keras._impl.keras.backend import abs
ImportError: cannot import name 'abs'
(tensorflow) C:Usersice305tensorflowmodelsresearchobject_detection>

I don’t understand what ‘abs’ is. Please help

1 Answers
Best Answer
AvatarAmit answered 1 year ago
Your Answer

18 + 18 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com