Stance-Detection-in-Web-and.../TAN
2019-06-18 21:54:44 +05:30
..
early_stopping_training.py finalised TAN 2019-06-18 21:42:32 +05:30
emnlp_dict.txt added TAN repository 2019-06-18 21:04:57 +05:30
networks.py finalised TAN 2019-06-18 21:42:32 +05:30
noslang_data.json added TAN repository 2019-06-18 21:04:57 +05:30
README.md Updated README.md 2019-06-18 21:54:44 +05:30
utils.py finalised TAN 2019-06-18 21:42:32 +05:30

networks.py

class LSTM_TAN(nn.Module):

def __init__(self,version,embedding_dim, hidden_dim, vocab_size, n_targets,embedding_matrix,dropout = 0.5):

Args

  1. version - str - one of ["lstm,"tan-","tan"]
  2. embedding_dim - int - dimension of word_embedding
  3. hidden_dim - int - dimension of LSTM hidden state
  4. vocab_size - int - number of words in the vocabulary
  5. n_targets - int - number of target classes
  6. embedding_matrix - numpy array dtype=float - word embedding matrix
  7. dropout - The dropout to be applied before on the final hidden state(lstm)/attention-weighted hidden state (tan-,tan)

Running the code

To run the code you have to run get_training_plots.py or early_stopping_training.py
To change models, call the classes with specific versions as mentioned above