371a1b952acb0d2cccaf3ece7f594763d3f02e03,datasets/videodataset.py,VideoDataset,__getitem__,#VideoDataset#Any#,94

Before Change


        if self.temporal_transform is not None:
            frame_indices = self.temporal_transform(frame_indices)
        clip = self.loader(path, frame_indices)
        if self.spatial_transform is not None:
            self.spatial_transform.randomize_parameters()
            clip = [self.spatial_transform(img) for img in clip]
        clip = torch.stack(clip, 0).permute(1, 0, 2, 3)

        target = self.data[index]
        if self.target_transform is not None:
            target = self.target_transform(target)

After Change


        if self.temporal_transform is not None:
            frame_indices = self.temporal_transform(frame_indices)

        if isinstance(frame_indices[0], list):
            clips = []
            for one_frame_indices in frame_indices:
                clips.append(self.loading(path, one_frame_indices))

            return clips, [target for _ in range(len(clips))]

        else:
            clip = self.loading(path, frame_indices)

            return clip, target

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

Frequency: 3

Non-data size: 6

Instances


Project Name: kenshohara/3D-ResNets-PyTorch
Commit Name: 371a1b952acb0d2cccaf3ece7f594763d3f02e03
Time: 2018-11-02
Author: kensho.hara@aist.go.jp
File Name: datasets/videodataset.py
Class Name: VideoDataset
Method Name: __getitem__


Project Name: arraiy/torchgeometry
Commit Name: e06eee5deec11dc03d6c4975eb9a57f2bc6edd30
Time: 2019-05-28
Author: jiangwei1993@gmail.com
File Name: kornia/utils/image.py
Class Name:
Method Name: tensor_to_image


Project Name: arraiy/torchgeometry
Commit Name: e06eee5deec11dc03d6c4975eb9a57f2bc6edd30
Time: 2019-05-28
Author: jiangwei1993@gmail.com
File Name: kornia/utils/image.py
Class Name:
Method Name: image_to_tensor