Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pooling Method #3

Open
fikrimohammad opened this issue May 9, 2019 · 1 comment
Open

Pooling Method #3

fikrimohammad opened this issue May 9, 2019 · 1 comment

Comments

@fikrimohammad
Copy link

Hi siddsax,

I wanna ask about the pooling layer because you're using a sliding max pooling. XML-CNN use dynamic max pooling with the definition "For a p document with m words, we evenly divide its m-dimensional feature map into p chunks, each chunk is pooled to a single feature by taking the largest value within that chunk".

@YipingNUS
Copy link

I think it should be the same as Avg pooling.

l_pool = nn.MaxPool1d(pool_size, stride=None, count_include_pad=True)

the pooling_units parameter corresponds to the parameter p in the paper. So it's a direct translation (ignoring the padding part)

pool_size = l_out_size // params.pooling_units

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants