[tf]AttributeError: module ‘tensorflow_datasets.core‘ has no attribute ‘text‘
最新推荐文章于 2024-07-08 13:22:56 发布
在使用tensorflow_datasets库时遇到AttributeError,提示'tensorflow_datasets.core'模块没有'text'属性。问题源于TensorFlow版本升级导致的API变动。通过查阅资料发现,解决方案在于使用tfds.deprecated.text.SubwordTextEncoder,按照官方文档更新代码后,问题得到解决。
摘要由CSDN通过智能技术生成