我试着在Google collaboratory上运行这个
第一个月
我希望使用该模型进行文本分类。
但我无法安装此模型,我一直得到这个错误:
2023-10-26 18:22:02.571699: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2023-10-26 18:22:02.571769: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2023-10-26 18:22:02.571814: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-10-26 18:22:02.580822: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-10-26 18:22:03.859736: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
✘ No compatible package found for 'en_trf_xlnetbasecased_lg' (spaCy
v3.7.2)
字符串
我应该做什么,因为我已经安装了最新版本的spaCy。我很感激和感谢任何帮助,你可以给予
1条答案
按热度按时间aij0ehis1#
由于
spacy
从2.x
版本到3.x
版本中的Transformer模型的name change,您需要将模型名称en_trf_xlnetbasecased_lg
替换为en_core_web_trf
。在google colab中,您可能还需要单独安装spacy_transformers
。使用以下命令:字符串
下载模型后,您可以通过以下方式使用它:
型
测试它与
spacy 3.6.1
和它的工作正常!