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

 

 

哈哈,大功告成!

 

 

 

 

 


本文转载:CSDN博客