b591a7aecce5b8de42a0dd7bba62780675d34fce,utils/datasets.py,ListDataset,collate_fn,#,141

Before Change


        paths, imgs, labels = list(zip(*batch))
        for i, boxes in enumerate(labels):
            boxes[:, 0] = i
        imgs = torch.stack(imgs, 0)
        labels = torch.cat(labels, 0)
        return paths, imgs, labels

    def __len__(self):

After Change


        if self.multiscale:
            img_size = random.sample(list(range(self.min_size, self.max_size + 1, 32)), 1)[0]
        else:
            img_size = self.img_size
        imgs = torch.stack([resize(img, img_size) for img in imgs])
        return paths, imgs, labels

    def __len__(self):
        return len(self.img_files)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: b591a7aecce5b8de42a0dd7bba62780675d34fce
Time: 2019-04-30
Author: eriklindernoren@live.se
File Name: utils/datasets.py
Class Name: ListDataset
Method Name: collate_fn


Project Name: keras-team/keras
Commit Name: 8fc8a1681332cc4c8b05260b20ee54fa1589e3d2
Time: 2018-10-20
Author: gibson.ljg@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: rnn


Project Name: ellisdg/3DUnetCNN
Commit Name: c8b1cf5ae63f817e0463199d54f75da7deab0265
Time: 2017-05-19
Author: david.ellis@unmc.edu
File Name: unet3d/utils/utils.py
Class Name:
Method Name: read_image_files