【发布时间】:2021-03-25 15:30:02
【问题描述】:
我已尝试按照 Tensorflow 说明使用 BERT 模型:(https://www.tensorflow.org/tutorials/text/classify_text_with_bert)
但是,当我运行这些行时:
text_test = ['this is such an amazing movie!']
text_preprocessed = bert_preprocess_model(text_test)
我收到以下错误:
InvalidArgumentError:尝试使用错误的类型访问资源。预期类 tensorflow::lookup::LookupInterface 得到类 tensorflow::lookup::LookupInterface [[{{node StatefulPartitionedCall/StatefulPartitionedCall/bert_tokenizer/StatefulPartitionedCall/WordpieceTokenizeWithOffsets/WordpieceTokenizeWithOffsets/WordpieceTokenizeWithOffsets}}]] [Op:__inference_restored_function_body_72474]这两个类完全一样:“tensorflow::lookup::LookupInterface”。有人可以帮忙吗?谢谢。
【问题讨论】:
-
我在windows10上遇到同样的问题有什么解决办法吗?
-
同样的问题!你们找到解决办法了吗?
标签: python tensorflow bert-language-model