How get sentenses embbedings from TFBertForMaskedLM
Good afternoon!

I am solving a text clustering problem by fine-tuning a trained BERT model. After seeing a number of articles on the subject, I decided to use the masking problem and the TFBertForMaskedLM model for fine-tuning. I was able to fine-tune the network on my set, and now I want to use the embbedings of this model to transform my set and feed into the clustering algorithm.

The question and problem is that the output of `bert_model.layers[0]` is `[None, max_len, emb_size]`, I get emb of each word, and I need emb of a document or sequence, any way out?

Hello, thanks for opening an issue! We try to keep the github issues for bugs/feature requests.
Could you ask your question on the [forum](https://discusss.huggingface.co) instead?

Thanks!<|||||>Resolved