gpt4 book ai didi

python - 导入错误 : cannot import name 'rnn_cell'

转载 作者:太空宇宙 更新时间:2023-11-03 14:55:01 26 4
gpt4 key购买 nike

在windows和linux上使用tensorflow 1.0.1

当我运行时:

from tensorflow.python.ops import rnn, rnn_cell

我得到:

ImportError: cannot import name 'rnn_cell'

提前致谢

最佳答案

Tensorflow 1.0 变化很大。 rnn_cell 不在/tensorflow/python/ops 路径中。当你在tensorflow doc中搜索时,你可以在doc中找到rnn_cell before 1.0 is at tf.nn.rnn_cell such as doc 0.11或文档 0.12 .

在 tensorflow 1.0 中,您可以找到 tensorflow/contrib/rnn/python/ops/rnn_cell.pytensorflow/python/ops/rnn_cell.impl.py

关于python - 导入错误 : cannot import name 'rnn_cell' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43307660/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com