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

Clarifications regarding ESIM Model code #24

Open
aayushee opened this issue Apr 24, 2019 · 1 comment
Open

Clarifications regarding ESIM Model code #24

aayushee opened this issue Apr 24, 2019 · 1 comment

Comments

@aayushee
Copy link

Hi

I have a few questions related to the ESIM model for NLI:

  1. The ESIM paper says all vectors are updated during training including word vectors. Do the pretrained word embeddings from Glove also get updated in your ESIM model code?
  2. The file at ESIM/main_batch_snli.py uses only ESIM model while the file at ESIM/Tree_IM/main_snli.py uses both ESIM and Tree LSTM Models, right?
  3. The num_units in ESIM LSTM is always equal to pretrained embeddings dimension. Is it a necessity? I got dimension errors while trying to change num_units in LSTM.
  4. There is a default parameter max_sentence_length = 30 but it isn't used anywhere in the model_batch.py file. Is there any significance for this? I thought max_len is the parameter that controls sequence length and can be modified in the main_snli.py file.

It would be great if you could clear these doubts.
Thanks!

@lanwuwei
Copy link
Owner

Hello, here is my answer:

  1. yes. They are updated during training.
  2. Tree_IM just replaces original LSTM modules into Tree LSTM, so I reuse many code in original ESIM.
  3. LSTM has input_size (The number of expected features in the input x) and hidden_size (The number of features in the hidden state h), the first one input_size should be equal to word embedding dim.
  4. max_sentence_length = 30 is used in model training, where longer sentences (>30) will be skipped.

Best,
Wuwei

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