【发布时间】:2021-07-26 11:31:18
【问题描述】:
我正在使用 ELMO 为我的数据集创建嵌入,我总是收到此错误:
embed=elmo(data,signature="default",as_dict=True)["elmo"]
TypeError: 'AutoTrackable' object is not callable
我的代码就这么简单:
import tensorflow_hub as hub
import tensorflow as tf
elmo = hub.load("https://tfhub.dev/google/elmo/3")
embeddings = elmo(
["the cat is on the mat", "dogs are in the fog"],
signature="default",
as_dict=True)["elmo"]
【问题讨论】:
标签: python tensorflow nlp embedding elmo