簡體   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'

我正在嘗試重新訓練 inception v3 model。

但是,我被一個錯誤卡住了

AttributeError:模塊'tensorflow.python.framework.op_def_registry'沒有屬性'get_registered_ops'

在 tensorflow_hub native_module.py 文件中。

為什么我會收到此錯誤?

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

get_registered_ops()在最新版本中已被刪除。 一定要使用 tensorflow-hub>=0.7.0 在https://github.com/tensorflow/hub/blob/v0.7.0/tensorflow_hub/native_module.py#L50 學習黑魔法

  1. 使用 Tensorflow 1.11 或更高版本。 但是,不要 go 繼續使用 Tensorflow 2.*。
  2. 此外,對於當前最新版本的 tensorflow-hub 0.10.0,您需要 tf >= 1.15.0。 因此,最好使用 1.15.0 <= tf < 2.* 和 tf-hub latest(0.10.0)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM