def process_lengths(input):
    '\n    Computing the lengths of sentences in current batchs\n    '
    max_length = input.size(1)
    lengths = list((max_length - input.data.eq(0).sum(1).squeeze()))
    return lengths
Computing the lengths of sentences in current batchs
def process_lengths(input):
    '\n    \n    '
    max_length = input.size(1)
    lengths = list((max_length - input.data.eq(0).sum(1).squeeze()))
    return lengths