(x)
| 445 | |
| 446 | @staticmethod |
| 447 | def _normalization(x): |
| 448 | assert len(x.shape) == 4 |
| 449 | x = x.sub(torch.tensor([123.675, 116.280, 103.530]).view(1, 3, 1, 1).cuda()).div(torch.tensor([58.395, 57.120, 57.375]).view(1, 3, 1, 1).cuda()) |
| 450 | return x |
| 451 | |
| 452 | def get_num_layers(self): |
| 453 | return len(self.blocks) |