MCPcopy Create free account
hub / github.com/huggingface/transformers / __init__

Method __init__

examples/seq2seq/utils.py:152–153  ·  view source on GitHub ↗
(self, data, batch_size)

Source from the content-addressed store, hash-verified

150 "Go through the text data by order of src length with a bit of randomness. From fastai repo."
151
152 def __init__(self, data, batch_size):
153 self.data, self.bs = data, batch_size
154
155 def key(self, i):
156 return len(self.data[i])

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected