如题,可解决AttributeError:model ‘tensorflow_core.compat.v1’ has no attribute 'contrib’和AttributeError: module ‘tensorflow.contrib.rnn’ has no attribute ‘BasicLSTMCell’
原因是没有BasicLSTMCell,tensorflow1.2.1中改了函数位置
改为tf.nn.rnn_cell.BasicLSTMCell(num_hidden, forget_bias=1.0) 就好