SPM_toolkit icon indicating copy to clipboard operation
SPM_toolkit copied to clipboard

Clarifications regarding ESIM Model code

Open aayushee opened this issue 5 years ago • 1 comments

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!

aayushee avatar Apr 24 '19 19:04 aayushee

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

lanwuwei avatar Apr 25 '19 19:04 lanwuwei