Reformer hidden_size of output is doubled.
# ❓ Questions & Help

<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,
     new models and benchmarks, and migration questions. For all other questions,
     we direct you to Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. Make sure to tag your question with the
     right deep learning framework as well as the huggingface-transformers tag: 
     https://stackoverflow.com/questions/tagged/huggingface-transformers 
     
     If your question wasn't answered after a period of time on Stack Overflow, you
     can always open a question on GitHub. You should then link to the SO question 
     that you posted.
     -->

## Details
<!-- Description of your issue -->

The default hidden_size is 256 but the output dim is 512. Similarly, when I change the config and set hidden_size to 512, the output dim is 1024. 

```python

enc_config = {
    "attention_head_size": 64,
    "attn_layers": ["local", "lsh", "local", "lsh", "local", "lsh"],
    "axial_pos_embds": True,
    "sinusoidal_pos_embds": False,
    "axial_pos_embds_dim": [256, 256],
    "axial_pos_shape": [64, 64],
    "lsh_attn_chunk_length": 64,
    "local_attn_chunk_length": 64,
    "feed_forward_size": 256,
    "hidden_act": "relu",
    "hidden_size": 512,
    "is_decoder": False,
    "max_position_embeddings": 4096,
    "num_attention_heads": 12,
    "num_buckets": [64, 64],
    "num_hashes": 4,
    "lsh_attention_probs_dropout_prob": 0.0,
    "lsh_num_chunks_before": 1,
    "lsh_num_chunks_after": 0,
    "local_num_chunks_before": 1,
    "local_num_chunks_after": 0,
    "local_attention_probs_dropout_prob": 0.025,
    "hidden_dropout_prob": 0.025,
    "pad_token_id": tokenizer.pad_token_id,
    "eos_token_id": tokenizer.eos_token_id, 
    "vocab_size": tokenizer.vocab_size,
}

reformer = ReformerModel(ReformerConfig(**enc_config))
input_ids = tokenizer.encode(doc, max_length=4096, pad_to_max_length=True, return_tensors='pt')
out = reformer.forward(input_ids)
out[0].shape
```
```
torch.Size([1, 4096, 1024])
```


<!-- You should first ask your question on SO, and only if
     you didn't get an answer ask it here on GitHub. -->
**A link to original question on Stack Overflow**:

Hey @h324yang, 

Good observation! The reason for this is that Reformer uses Reversible Residual Layers and thus always has two input streams (two hidden states inputs) instead of one. Both of these streams have to be concatenated after running through the model which leads to double the size of `hidden_states`. I will soon ~1 week publish a notebook explaining this in more detail :-) 