For Tensorflow 1.2 and Keras 2.0, the line tf.contrib.rnn.core_rnn_cell.BasicLSTMCell should be replaced by tf.contrib.rnn.BasicLSTMCell.
tf.contrib.rnn.core_rnn_cell.BasicLSTMCell
tf.contrib.rnn.BasicLSTMCell