(batch)
| 293 | } |
| 294 | |
| 295 | def title_w2v_collate_fn(batch): |
| 296 | length_title = 128 |
| 297 | title_w2v = [item['title_w2v'] for item in batch] |
| 298 | title_w2v = pad_sequence(length_title, title_w2v, 100) |
| 299 | |
| 300 | label = [item['label'] for item in batch] |
| 301 | |
| 302 | return { |
| 303 | 'label': torch.stack(label), |
| 304 | 'title_w2v': title_w2v, |
| 305 | } |
| 306 | |
| 307 | |
| 308 | class Run(): |
nothing calls this directly
no test coverage detected