(
self, dataset, transform=None,
backdoor_indices=None, trigger_trans=None, attack_trans=None)
| 387 | |
| 388 | class BackdoorDataset: |
| 389 | def __init__( |
| 390 | self, dataset, transform=None, |
| 391 | backdoor_indices=None, trigger_trans=None, attack_trans=None): |
| 392 | |
| 393 | self.dataset = dataset |
| 394 | self.transform = transform |
| 395 | |
| 396 | self.backdoor_indices = set() if ( |
| 397 | backdoor_indices is None) else set(backdoor_indices) |
| 398 | self.trigger_trans = trigger_trans |
| 399 | self.attack_trans = attack_trans |
| 400 | |
| 401 | def __getitem__(self, i): |
| 402 | x, y = self.dataset[i] |
nothing calls this directly
no outgoing calls
no test coverage detected