MCPcopy Create free account
hub / github.com/ICTMCG/FakeSV / title_w2v_collate_fn

Function title_w2v_collate_fn

code/run.py:295–305  ·  view source on GitHub ↗
(batch)

Source from the content-addressed store, hash-verified

293 }
294
295def 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
308class Run():

Callers

nothing calls this directly

Calls 1

pad_sequenceFunction · 0.85

Tested by

no test coverage detected