成功解决AttributeError: module 'tensorflow.nn.rnn_cell' has no attribute 'linear'

简介: 成功解决AttributeError: module 'tensorflow.nn.rnn_cell' has no attribute 'linear'

解决问题


AttributeError: module 'tensorflow.nn.rnn_cell' has no attribute 'linear'





解决思路


由于不同的TensorFlow版本之间某些函数的用法引起的错误


属性错误:模块'tensorflow.nn.rnn_cell'没有属性'linear'





解决方法



tf.nn.rnn_cell


改为  


tf.contrib.rnn.core_rnn_cell




哈哈,大功告成!


目录
打赏
0
0
0
0
1043
分享
相关文章
【Python】已解决ModuleNotFoundError: No module named ‘tensorflow‘
【Python】已解决ModuleNotFoundError: No module named ‘tensorflow‘
376 1
【Tensorflow+keras】解决使用model.load_weights时报错 ‘str‘ object has no attribute ‘decode‘
python 3.6,Tensorflow 2.0,在使用Tensorflow 的keras API,加载权重模型时,报错’str’ object has no attribute ‘decode’
104 0
Python升级tensorflow2.x版本相关问题:No module named ‘tensorflow.contrib‘ 问题解决
Python升级tensorflow2.x版本相关问题:No module named ‘tensorflow.contrib‘ 问题解决
344 0
[不用回退keras版本的解决方法]AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu'
[不用回退keras版本的解决方法]AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu'
309 0
[不用回退keras版本的解决方法]AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu'
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
201 0
解决AttributeError: module ‘tensorflow‘ has no attribute ‘div‘
解决ModuleNotFoundError: No module named ‘tensorflow_datasets‘
解决ModuleNotFoundError: No module named ‘tensorflow_datasets‘
352 0
解决ModuleNotFoundError: No module named ‘tensorflow_datasets‘
TensorFlow修改图像尺寸:AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘image‘
TensorFlow修改图像尺寸:AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘image‘
153 0
TensorFlow修改图像尺寸:AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘image‘

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等