zl程序教程

您现在的位置是:首页 >  其它

当前栏目

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

解决 成功 No Tensorflow module has attribute AttributeError
2023-09-14 09:04:51 时间

成功解决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

 

 

哈哈,大功告成!