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

Add sse model #168

Merged
merged 9 commits into from Dec 18, 2018

Conversation

Projects
None yet
2 participants
@Victor0118
Copy link
Member

commented Dec 3, 2018

Reference:
Paper: Shortcut-Stacked Sentence Encoders for Multi-Domain Inference
Code: https://github.com/easonnie/multiNLI_encoder

@likicode @daemon Could you review this PR?

@daemon daemon self-requested a review Dec 16, 2018

@daemon
Copy link
Member

left a comment

Minor changes.


class StackBiLSTMMaxout(nn.Module):
def __init__(self, h_size=[512, 1024, 2048], d=300, mlp_d=1600, dropout_r=0.1, max_l=60, num_classes=3):
super(StackBiLSTMMaxout, self).__init__()

This comment has been minimized.

Copy link
@daemon

daemon Dec 16, 2018

Member

super().__init__() suffices.

import numpy as np

def auto_rnn_bilstm(lstm: nn.LSTM, seqs, lengths):

This comment has been minimized.

Copy link
@daemon

daemon Dec 16, 2018

Member

Double-spaced code?

if not args.skip_training:
total_params = 0
for param in model.parameters():
size = [s for s in param.size()]

This comment has been minimized.

Copy link
@daemon

daemon Dec 16, 2018

Member

total_params = sum(p.numel() for p in model.parameters()) is more concise.

@Victor0118

This comment has been minimized.

Copy link
Member Author

commented Dec 18, 2018

@daemon All of your comments fixed.

@daemon

This comment has been minimized.

Copy link
Member

commented Dec 18, 2018

LG

@daemon

daemon approved these changes Dec 18, 2018

@Victor0118 Victor0118 merged commit 57f53a8 into castorini:master Dec 18, 2018

@Victor0118 Victor0118 deleted the Victor0118:add-sse branch Dec 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.