Elmo 嵌入错误

问题描述

我正在使用 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"],as_dict=True)["elmo"]

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)