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

Please go to Stack Overflow for help and support:

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/ --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:

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/ --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/] Successfully opened dynamic library Traceback (most recent call last): File "legacy/", line 48, in <module> from tensorflow.contrib import framework as contrib_framework File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/", line 31, in <module> from tensorflow.contrib import cloud File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/", line 24, in <module> from import * File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/", line 21, in <module> from import gen_bigquery_reader_ops File "/home/adele/.local/lib/python3.6/site-packages/tensorflow/contrib/cloud/python/ops/", 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/", 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'


Answer questions rmbadl

I have no standalone code, the "" 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)

Github User Rank List