Mean reduce over last hidden state
One of the outputs of [TFBert](https://huggingface.co/transformers/model_doc/bert.html#transformers.TFBertModel.call) is the `last_hidden_state` which is a tensor of shape `(batch_size, sequence_length, hidden_size)`.

How someone could proceed to compute the `mean pooling` of the valid embeddings? I mean, as the `attention_mask` avoids performing attention on padding token indices, it can be used as weight to average only over the real input embeddings ignoring the pad embeddings.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
