MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _normalization

Method _normalization

PATH/core/models/backbones/vitdet.py:419–422  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

417
418 @staticmethod
419 def _normalization(x):
420 assert len(x.shape) == 4
421 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())
422 return x
423
424 def get_num_layers(self):
425 return len(self.blocks)

Callers 1

forwardMethod · 0.95

Calls 1

cudaMethod · 0.45

Tested by

no test coverage detected