(self, word_size, pos_size, hidden_size, output_size,
max_text_len)
| 106 | class T2MTextEncoder(nn.Module): |
| 107 | |
| 108 | def __init__(self, word_size, pos_size, hidden_size, output_size, |
| 109 | max_text_len): |
| 110 | super().__init__() |
| 111 | self.text_encoder = TextEncoderBiGRUCo( |
| 112 | word_size=word_size, |
| 113 | pos_size=pos_size, |
| 114 | hidden_size=hidden_size, |
| 115 | output_size=output_size, |
| 116 | ) |
| 117 | self.w_vectorizer = WordVectorizer('./data/glove', 'our_vab') |
| 118 | self.max_text_len = max_text_len |
| 119 | |
| 120 | def load_pretrained(self, ckpt_path): |
| 121 | checkpoint = torch.load(ckpt_path, map_location='cpu') |