fc56073588771c81b4e134bff54195f5e74e6b43,thinc/backends/ops.py,Ops,minibatch,#,31

Before Change


        
        sizes = itertools.repeat(size) if isinstance(size, int) else size
        is_list = isinstance(sequence, list)
        if isinstance(sequence, list):  // need condition here for type checking
            sequence = Objects(sequence)
        indices = numpy.arange(len(sequence))
        if shuffle:
            numpy.random.shuffle(indices)
        i = 0

After Change


            batch_size = next(sizes)
            idx_batch = indices[i : i + batch_size]
            if isinstance(sequence, list):
                subseq = [sequence[i] for i in idx_batch]
            elif isinstance(sequence, tuple):
                subseq = tuple(sequence[i] for i in idx_batch)  // type: ignore
            else:
                subseq = sequence[idx_batch]  // type: ignore
            if is_xp_array(subseq):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: explosion/thinc
Commit Name: fc56073588771c81b4e134bff54195f5e74e6b43
Time: 2020-01-21
Author: ines@ines.io
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: minibatch


Project Name: analysiscenter/batchflow
Commit Name: ce5696eca3f3b35e4d6f10ad6d8b94fbcecb686d
Time: 2021-02-09
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/torch/layers/conv.py
Class Name: BaseConv
Method Name: __init__


Project Name: rtqichen/torchdiffeq
Commit Name: 7391aec984c1e9e0899d51e6b0538483c37ec8fb
Time: 2020-07-27
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/adjoint.py
Class Name:
Method Name: odeint_adjoint