(self, ckpt_path)
| 122 | self.max_text_len = max_text_len |
| 123 | |
| 124 | def load_pretrained(self, ckpt_path): |
| 125 | checkpoint = torch.load(ckpt_path, map_location='cpu') |
| 126 | self.text_encoder.load_state_dict(checkpoint['text_encoder']) |
| 127 | |
| 128 | def forward(self, text, token, device): |
| 129 | B = len(text) |
no outgoing calls
no test coverage detected