# Getting output attentions for encoder\_attention decoder layers

**URL:** <https://discuss.huggingface.co/t/getting-output-attentions-for-encoder-attention-decoder-layers/1730>\
**Category:** 🤗Transformers\
**Created:** [October 24, 2020, 10:24pm UTC](https://discuss.huggingface.co/t/getting-output-attentions-for-encoder-attention-decoder-layers/1730 "2020-10-24T22:24:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vibss97](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vibss97](https://discuss.huggingface.co/u/vibss97)\
**Post date:** [October 24, 2020, 10:24pm UTC](https://discuss.huggingface.co/t/getting-output-attentions-for-encoder-attention-decoder-layers/1730/1 "2020-10-24T22:24:23Z")

</div>

Hi, so I am using a marian MT model and trying to get multiheaded encoder\_attention values from the decoder layers. I use hooks to get those attention\_outputs and pass the config : `config = MarianConfig.from_pretrained(romance_model_name, output_attentions=True)`, and it is returning self attention in the decoder layers as a tuple of (attn\_value attn\_outputs), however for the encoder-decoder attention, it returns me a tuple of (attn\_value, None). Is there a way to get multi headed attention\_outputs for the encoder-decoder attention
