(self, index)
| 38 | random.shuffle(self.sample_ids) |
| 39 | |
| 40 | def __getitem__(self, index): |
| 41 | sample_info = self.sample_ids[index] |
| 42 | dataset_idx = sample_info['dataset_idx'] |
| 43 | sample_idx = sample_info['sample_idx'] |
| 44 | |
| 45 | sample = self.datasets[dataset_idx][sample_idx] |
| 46 | sample['degradation_type'] = torch.tensor(dataset_idx, dtype=torch.long) |
| 47 | return sample |
| 48 | |
| 49 | def __len__(self): |
| 50 | return len(self.sample_ids) |
nothing calls this directly
no outgoing calls
no test coverage detected