[Help] How to do mean/max pooling to get sentence embedding?
Hi, I read a few questions raised before regarding sentence embedding and came across mean/max pooling suggestions. 

Not too sure how to go about doing mean/max pooling.

Is my implementation correct for mean pooling? I simply took the sum of all the token vectors and divide them by total sequence length.

![image](https://user-images.githubusercontent.com/46053996/63739517-04201c00-c8c0-11e9-97ca-259efc8c60d9.png)

Thanks :)


Hi! Yes this would work, but it would certainly be slower than using [the torch `mean` function](https://pytorch.org/docs/stable/torch.html#torch.mean)!<|||||>Understood thanks! :)