Пример #1
0
def batch_padder(finput, ftarget, vocabi, vocabt, bsize, maxpad, maxpart,
                 maxtoken, minbsize):
    for i_d, td, mlen_i, mlen_t, nsent in batch_mapper(finput, ftarget, vocabi,
                                                       vocabt, bsize, maxpad,
                                                       maxpart, maxtoken,
                                                       minbsize):
        yield pad_batch(i_d, mlen_i), pad_batch(td, mlen_t), nsent
Пример #2
0
def batch_padder(finput, vocabi, vocabtask, bsize, maxpad, maxpart, maxtoken,
                 minbsize):

    for i_d, taskd, mlen_i in batch_mapper(finput, vocabi, vocabtask, bsize,
                                           maxpad, maxpart, maxtoken,
                                           minbsize):
        yield pad_batch(i_d, mlen_i), taskd
Пример #3
0
def batch_padder(finput, vocabi, bsize, maxpad, maxpart, maxtoken, minbsize):

	for i_d, mlen_i, nsent in batch_mapper(finput, vocabi, bsize, maxpad, maxpart, maxtoken, minbsize):
		yield pad_batch(i_d, mlen_i), nsent