profile
viewpoint

Ask questionsAttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'

Please go to Stack Overflow for help and support:

https://stackoverflow.com/questions/tagged/tensorflow

If you open a GitHub issue, here is our policy:

  1. It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
  2. The form below must be filled out.
  3. It shouldn't be a TensorBoard issue. Those go here.

Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.


System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): 2.0.0
  • Python version: 3.6
  • Bazel version (if compiling from source): 0.27.1
  • GCC/Compiler version (if compiling from source): 7.4.0
  • CUDA/cuDNN version: 10.2
  • GPU model and memory: NVIDIA 970
  • Exact command to reproduce: python3 legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with:

python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the problem

Trying tensorflow's trainning appears an error message about a non existed attribute (register_op_list') . I checked in the file that is supposed to have it and it really doesn't have it. I looked for that attribute in every single path I thought it could be but I didn't get anything at all. I have no clue of how I can resolve this.

To resolve the contrib issue of tf2.0 i used tf-slim but if you have a way to resolve it completely that doesn't trigger this error please let me know because I'm quite sure that everything comes because of the "contrib" problem. Thanks

Source code / logs

### python3 legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

2019-12-02 13:59:36.908351: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2 Traceback (most recent call last): File "legacy/train.py", line 48, in <module> from tensorflow.contrib import framework as contrib_framework File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/init.py", line 31, in <module> from tensorflow.contrib import cloud File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/init.py", line 24, in <module> from tensorflow.contrib.cloud.python.ops.bigquery_reader_ops import * File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/bigquery_reader_ops.py", line 21, in <module> from tensorflow.contrib.cloud.python.ops import gen_bigquery_reader_ops File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/gen_bigquery_reader_ops.py", line 369, in <module> _op_def_lib = _InitOpDefLibrary(b"\n\355\001\n\016BigQueryReader\032\024\n\rreader_handle\030\007\200\001\001"\027\n\tcontainer\022\006string\032\002\022\000"\031\n\013shared_name\022\006string\032\002\022\000"\024\n\nproject_id\022\006string"\024\n\ndataset_id\022\006string"\022\n\010table_id\022\006string"\027\n\007columns\022\014list(string)"\027\n\020timestamp_millis\022\003int"\034\n\016test_end_point\022\006string\032\002\022\000\210\001\001\n\331\001\n GenerateBigQueryReaderPartitions\032\016\n\npartitions\030\007"\024\n\nproject_id\022\006string"\024\n\ndataset_id\022\006string"\022\n\010table_id\022\006string"\027\n\007columns\022\014list(string)"\027\n\020timestamp_millis\022\003int"\025\n\016num_partitions\022\003int"\034\n\016test_end_point\022\006string\032\002\022\000") File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/gen_bigquery_reader_ops.py", line 277, in _InitOpDefLibrary _op_def_registry.register_op_list(op_list) AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list'

tensorflow/tensorflow

Answer questions rmbadl

I have no standalone code, the "train.py" code that I use is the tensorflow's one. I was just following this page . I downloaded tensorflow and bazel and followed each ones guides to install them.. (from their own pages)

useful!

Related questions

ModuleNotFoundError: No module named 'tensorflow.contrib' hot 8
Error occurred when finalizing GeneratorDataset iterator hot 7
tensorflow-gpu CUPTI errors
Error loading tensorflow
ModuleNotFoundError: No module named 'tensorflow.contrib'
module 'tensorflow' has no attribute 'ConfigProto'
TF 2.0 'Tensor' object has no attribute 'numpy' while using .numpy() although eager execution enabled by default
When importing TensorFlow, error loading Hadoop
tf.keras.layers.Conv1DTranspose ?
[TF 2.0] tf.keras.optimizers.Adam hot 4
Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning. hot 4
TF2.0 AutoGraph issue hot 4
Tf.Keras metrics issue hot 4
ModuleNotFoundError: No module named 'tensorflow.examples.tutorials' hot 4
module 'tensorflow.python._pywrap_tensorflow_internal' has no attribute 'TFE_NewContextOptions' hot 4
Github User Rank List