简体   繁体   中英

AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'get_registered_ops'

I am trying to retrain the inception v3 model.

However, I got stuck by an error

AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'get_registered_ops'

in the tensorflow_hub native_module.py file.

Why do I get this error?

missing_ops = graph_ops - set(op_def_registry.get_registered_ops().keys())

get_registered_ops() has been removed in recent versions of. Be sure to use tensorflow-hub>=0.7.0 to pick up on the black magic at https://github.com/tensorflow/hub/blob/v0.7.0/tensorflow_hub/native_module.py#L50

  1. Use Tensorflow 1.11 or greater. However, don't go on to use Tensorflow 2.*.
  2. Also, for the current latest version of tensorflow-hub 0.10.0, you need tf >= 1.15.0. Thus, best to use 1.15.0 <= tf < 2.* along with tf-hub latest(0.10.0).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM