我已经安装了
tflearn
,当我尝试导入它时出现以下错误:
ImportError: cannot import name 'is_sequence' from 'tensorflow.python.util.nest' (C:\Users\fsafi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tensorflow\python\util\nest.py)
我尝试了以下方法:
import tflearn
我在设置新的 tf 环境时遇到了完全相同的问题。我相信这是因为 tflearn==0.5.0 太旧了,无法与最新的tensorflow=2.13.0一起使用。
我必须将张量流回退到旧版本,例如 2.12.0 才能使其正常工作。
tflearn 上也有一个 PR 可以解决此问题,但仍在进行中: https://github.com/tflearn/tflearn/pull/1173/commits