简体   繁体   English

在“__init__.py”中找不到参考“TextVectorization”

[英]Cannot find reference 'TextVectorization' in '__init__.py'

I'm using Pycharm 2021.2.3 with tensorflow 2.6.2 on ubuntu 18.04.6我在 ubuntu 18.04.6 上使用 Pycharm 2021.2.3 和 tensorflow 2.6.2

When testing the Text classification tutorial from https://www.tensorflow.org/text/guide/word_embeddings在测试来自https://www.tensorflow.org/text/guide/word_embeddings的文本分类教程时

In this line:在这一行:

from tensorflow.keras.layers import TextVectorization

I got the error:我得到了错误:

Cannot find reference 'TextVectorization' in ' init .py'在“ init .py”中找不到参考“TextVectorization”

But calling TextVectorization in my model is working.但是在我的 model 中调用 TextVectorization 是有效的。 And if I use tf.keras.layers.TextVectorization, again no problem如果我使用 tf.keras.layers.TextVectorization,同样没问题

This is a bug.这是一个错误。 I opened an issue on jetbrains https://youtrack.jetbrains.com/issue/PY-51709我在 jetbrains https://youtrack.jetbrains.com/issue/PY-51709上打开了一个问题

TextVectorization is found under tensorflow.keras.layers.experimental.preprocessing , not tensorflow.keras.layers TextVectorization 在tensorflow.keras.layers.experimental.preprocessing下找到,而不是tensorflow.keras.layers

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 __init__.py 中找不到引用“xxx” - Cannot find reference 'xxx' in __init__.py 在 __init__.py [暂停] 中找不到引用“ref_name” - Cannot find reference 'ref_name' in __init__.py [on hold] 为什么 pygame 在“__init__.py”中找不到引用“...”? - Why pygame cannot find reference '…' in '__init__.py'? 在“ __init __。py” Google自定义搜索API中找不到引用“发现” - Cannot find reference 'discovery' in '__init__.py' Google custom search API 安装 opencv 后,如何解决 python 中的“Cannot find reference 'imread' in '__init__.py”错误? - How to resolve this error of "Cannot find reference 'imread' in '__init__.py" in python after installing opencv? Tensorflow 可以在 Pycharm 中使用,但在 __init__.py 中找不到引用 `xxx` - Tensorflow can be used in Pycharm, but cannot find reference `xxx` in __init__.py Python 3 Opencv 设置问题:“在 __init__.py 中找不到引用‘VideoCapture’” on Pycharm IDE - Python 3 Opencv set up problem: "cannot find reference 'VideoCapture' in __init__.py" on Pycharm IDE 无法使用__init__.py导入子包 - Cannot import subpackage using __init__.py PyCharm 在 __init__.py 中找不到任何 OpenCV function 的参考 - PyCharm can´t find reference of any OpenCV function in __init__.py 在 __init__.py 中导入 - Imports in __init__.py
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM