How to get sentence embeddings from encoder in Fastai learner language model
I was able to fine tune a language model using fast ai.  I would like to extract sentence embeddings from the fine-tuned model for sentence similarity.  How do I get the encoder model embeddings? Also can embeddings be compared with dot product like other embeddings from other models such as USE?

data_lm = TextLMDataBunch.from_df(train_df = se1, valid_df = se2, path = "",text_cols='text')
learn = language_model_learner(data_lm,drop_mult=0.7,pretrained=True,arch=AWD_LSTM)
learn.fit_one_cycle(3, 1e-01)


My code is above how can I get encodings from learn?

This should give you the encoder(Which is an embedding layer) :

learn.model[0].encoder
