My initial code (tf 1.12) is below
def _build_single_cell(self, lstm_units, keep_prob):
cell = tf.contrib.rnn.LayerNormBasicLSTMCell(lstm_units)
cell = tf.contrib.rnn.DropoutWrapper(cell, input_keep_prob=keep_prob, output_keep_prob=keep_prob)
return cell
I changed it to tf 2.2 code. Like this
def _build_single_cell(self, lstm_units, keep_prob):
cell = tfa.rnn.LayerNormLSTMCell(lstm_units)
cell = tf.compat.v1.nn.rnn_cell.DropoutWrapper(cell, input_keep_prob=keep_prob, output_keep_prob=keep_prob)
return cell
But error like this happened
AttributeError: 'LayerNormLSTMCell' object has no attribute 'zero_state'
How can I change it?