(self, x)
| 18 | CenterCrop(size=n_size + (self.shift_max if np.random.random() < p else 0))(x))) |
| 19 | |
| 20 | def forward(self, x): |
| 21 | # X is shaped: (C, H, W) |
| 22 | aug_x = torch.zeros((x.shape[0], self.n_size, self.n_size)) |
| 23 | for i in range(x.shape[0]): |
| 24 | aug_x[i, :, :] = self.chanel_shifter(x[[i], :, :])[0,:,:] |
| 25 | return aug_x |
nothing calls this directly
no outgoing calls
no test coverage detected