MCPcopy Index your code
hub / github.com/Doragd/Chinese-Chatbot-PyTorch-Implementation / zeroPadding

Function zeroPadding

dataload.py:7–13  ·  view source on GitHub ↗

l是多个长度不同的句子(list),使用zip_longest padding成定长,长度为最长句子的长度 在zeroPadding函数中隐式转置 [batch_size, max_seq_len] ==> [max_seq_len, batch_size]

(l, fillvalue)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

collate_fnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected