(img)
| 73 | """ |
| 74 | |
| 75 | def add_trigger(img): |
| 76 | if img.dim() == 2: |
| 77 | img = img.unsqueeze(0) |
| 78 | img = self.add_trigger(img) |
| 79 | img = img.squeeze() |
| 80 | else: |
| 81 | img = self.add_trigger(img) |
| 82 | return img |
| 83 | |
| 84 | if type(img) == PIL.Image.Image: |
| 85 | img = F.pil_to_tensor(img) |
nothing calls this directly
no outgoing calls
no test coverage detected