examples/research_projects/bertabs/modeling_bertabs.py/TransformerDecoder/init_decoder_state
class TransformerDecoder:    def init_decoder_state(self, src, memory_bank, with_cache=False):
        """Init decoder state"""
        state = TransformerDecoderState(src)
        if with_cache:
            state._init_cache(memory_bank, self.num_layers)
        return state