facebookresearch / SentEval

A python tool for evaluating the quality of sentence embeddings.
Other
2.09k stars 309 forks source link

Change batch size of encoder #72

Closed xyzhangfred closed 5 years ago

xyzhangfred commented 5 years ago

Hi,

Thanks for your work! Since I am working with a relatively large model, I'm wondering if there is any way I can change the batch size of when getting the embedding for each sentence (i.e. the batch size of the batcher function). In the example codes it seems only batch size of the classifier is changed? And I manually checked that no matter what I set the batch size of the classifier to be, the batcher still takes 128 sentences at a time.

xyzhangfred commented 5 years ago

I realized this is controled by params.batch_size.