EdGENetworks / attention-networks-for-classification

Hierarchical Attention Networks for Document Classification in PyTorch
603 stars 132 forks source link

the pad_batch function is error? #8

Open quoniammm opened 6 years ago

quoniammm commented 6 years ago

image

I feel that np.max should be used.However, here is np.mean

Sandeep42 commented 6 years ago

Yeah, np.max should be used ideally. I used mean because it is consuming too much of GPU memory. Now, I think you should ideally sort samples with their lengths so that the padding could be minimised. That hasn't been implemented here. You can have a look here.

https://github.com/EdGENetworks/anuvada