简体   繁体   English

AttributeError:模块'tensorflow.python.framework.op_def_registry'没有属性'get_registered_ops'

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

I am trying to retrain the inception v3 model.我正在尝试重新训练 inception v3 model。

However, I got stuck by an error但是,我被一个错误卡住了

AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'get_registered_ops' AttributeError:模块'tensorflow.python.framework.op_def_registry'没有属性'get_registered_ops'

in the tensorflow_hub native_module.py file.在 tensorflow_hub native_module.py 文件中。

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. get_registered_ops()在最新版本中已被删除。 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一定要使用 tensorflow-hub>=0.7.0 在https://github.com/tensorflow/hub/blob/v0.7.0/tensorflow_hub/native_module.py#L50 学习黑魔法

  1. Use Tensorflow 1.11 or greater.使用 Tensorflow 1.11 或更高版本。 However, don't go on to use Tensorflow 2.*.但是,不要 go 继续使用 Tensorflow 2.*。
  2. Also, for the current latest version of tensorflow-hub 0.10.0, you need tf >= 1.15.0.此外,对于当前最新版本的 tensorflow-hub 0.10.0,您需要 tf >= 1.15.0。 Thus, best to use 1.15.0 <= tf < 2.* along with tf-hub latest(0.10.0).因此,最好使用 1.15.0 <= tf < 2.* 和 tf-hub latest(0.10.0)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AttributeError:模块'tensorflow.python.framework.op_def_registry'没有属性'register_op_list - AttributeError: module 'tensorflow.python.framework.op_def_registry' has no attribute 'register_op_list AttributeError: 模块“tensorflow.python.framework.ops”没有属性“RegisterShape” - AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'RegisterShape' AttributeError:模块'tensorflow.python.framework.ops'没有属性'_TensorLike' - AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_TensorLike' tensorflow 中的 add 方法问题:AttributeError: module &#39;tensorflow.python.framework.ops&#39; has no attribute &#39;_TensorLike&#39; - Issue with add method in tensorflow : AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_TensorLike' 我无法理解这个 AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_TensorLike' - I cannot understand this AttributeError : module 'tensorflow.python.framework.ops' has no attribute '_TensorLike' Tensorflow模块导入错误:AttributeError:模块&#39;tensorflow.python.ops.nn&#39;没有属性&#39;rnn_cell&#39; - Tensorflow Module Import error: AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'rnn_cell' Tensorflow:AttributeError:模块&#39;tensorflow.python&#39;没有属性&#39;control_flow_ops&#39; - Tensorflow: AttributeError: module 'tensorflow.python' has no attribute 'control_flow_ops' Tensorflow:AttributeError:模块“tensorflow.python.ops.nn”没有属性“softmax_cross_entropy_with_logits_v2” - Tensorflow: AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'softmax_cross_entropy_with_logits_v2' AttributeError: &#39;tensorflow.python.framework.ops.EagerTensor&#39; 对象没有属性 &#39;to_tensor&#39; - AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_tensor' AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object 没有属性 'ravel' - AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'ravel'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM