0

I am a univ student. I am working on my graduation work using the EfficientDet model. First of all, I am using Efficientdet model for fine tuning my custom dataset.

python = 3.7
tensorflow = 2.5
tensorflow-gpu = 1.15
cuda = 11.0

these are versions of the packages I installed,

error message is

   =====> Starting training, epoch: 1.
WARNING:tensorflow:From /home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_core/python/training/training_util.py:236: Variable.initialized_value (from tensorflow.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Use Variable.read_value. Variables in 2.X are initialized automatically both in eager and graph (inside tf.defun) contexts.
W0527 01:25:16.531095 140153861850944 deprecation.py:323] From /home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_core/python/training/training_util.py:236: Variable.initialized_value (from tensorflow.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Use Variable.read_value. Variables in 2.X are initialized automatically both in eager and graph (inside tf.defun) contexts.
Traceback (most recent call last):
  File "main.py", line 407, in <module>
    app.run(main)
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/absl/app.py", line 303, in run
    _run_main(main, args)
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "main.py", line 400, in main
    run_train_and_eval(e)
  File "main.py", line 384, in run_train_and_eval
    max_steps=e * FLAGS.num_examples_per_epoch // FLAGS.train_batch_size)
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 370, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1161, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1188, in _train_model_default
    input_fn, ModeKeys.TRAIN))
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1025, in _get_features_and_labels_from_input_fn
    self._call_input_fn(input_fn, mode))
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1116, in _call_input_fn
    return input_fn(**kwargs)
  File "/home/ais-public/ms_ys/Liberty/automl/efficientdet/dataloader.py", line 431, in __call__
    _prefetch_dataset, num_parallel_calls=tf.data.AUTOTUNE)
  File "/home/ais-public/anaconda3/envs/peace/lib/python3.7/site-packages/tensorflow_core/python/util/module_wrapper.py", line 193, in __getattr__
    attr = getattr(self._tfmw_wrapped_module, name)
AttributeError: module 'tensorflow._api.v1.data' has no attribute 'AUTOTUNE'

I can't find 'tensorflow/_api/v1/data' folder and I don't know why this error is occurs. please tell me how to slove this error. Thanks.

1 Answer 1

2

Try to find this file and line:

File "/home/ais-public/ms_ys/Liberty/automl/efficientdet/dataloader.py", line >431, in call _prefetch_dataset, num_parallel_calls=tf.data.AUTOTUNE)

and change tf.data.AUTOTUNE to tf.data.experimental.AUTOTUNE. You have an older tensorflow-gpu version. AUTOTUNE is no longer experimental, as far as I know.

Or try to use just tensorflow 2.5, to avoid version conflicts.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.