self.bw_cell = MultiRNNCell_fn([self.bw_cell] * n_layer,
state_is_tuple=True)
except:
self.fw_cell = MultiRNNCell_fn([self.fw_cell] * n_layer)
self.bw_cell = MultiRNNCell_fn([self.bw_cell] * n_layer)
// Initial state of RNN
if fw_initial_state is None:
After Change
try:
self.fw_cell = MultiRNNCell_fn([cell_creator() for _ in range(n_layer)], state_is_tuple=True)
self.bw_cell = MultiRNNCell_fn([cell_creator() for _ in range(n_layer)], state_is_tuple=True)
except:
self.fw_cell = MultiRNNCell_fn([cell_creator() for _ in range(n_layer)])
self.bw_cell = MultiRNNCell_fn([cell_creator() for _ in range(n_layer)])