';自动跟踪';对象在Python中不可调用

';自动跟踪';对象在Python中不可调用,python,tensorflow,jupyter-notebook,Python,Tensorflow,Jupyter Notebook,我的tensorflow版本是2.0 tensorflow_轮毂版本为0.7 python版本是3.7 我有这些密码 import tensorflow as tf import tensorflow_hub as hub import summarizer_data_utils specials = ["<EOS>", "<SOS>","<PAD>","<UNK>"] word2ind, ind2word, missing_words = s

我的tensorflow版本是2.0

tensorflow_轮毂版本为0.7

python版本是3.7

我有这些密码

import tensorflow as tf
import tensorflow_hub as hub
import summarizer_data_utils

specials = ["<EOS>", "<SOS>","<PAD>","<UNK>"]
word2ind, ind2word,  missing_words = summarizer_data_utils.create_word_inds_dicts(words_counted,
                                                                       specials = specials)

#embed = hub.Module("https://tfhub.dev/google/nnlm-en-dim128/1")
embed = hub.load("https://tfhub.dev/google/Wiki-words-250/1")
emb = embed([key for key in word2ind.keys()])


这是TensorFlow中常见问题的一部分:

解决方案是提取您需要的签名,例如:

embed = hub.load('https://tfhub.dev/google/nnlm-en-dim128/1')
embed.signatures['default'](['my text', 'batch'])
https://tfhub.dev/google/Wiki-words-250/1
https://tfhub.dev/google/Wiki-words-250/2
embed = hub.load('https://tfhub.dev/google/nnlm-en-dim128/1')
embed.signatures['default'](['my text', 'batch'])