MCPcopy Create free account
hub / github.com/city-super/Octree-GS / normalize_activation

Function normalize_activation

lpipsPyTorch/modules/utils.py:6–8  ·  view source on GitHub ↗
(x, eps=1e-10)

Source from the content-addressed store, hash-verified

4
5
6def normalize_activation(x, eps=1e-10):
7 norm_factor = torch.sqrt(torch.sum(x ** 2, dim=1, keepdim=True))
8 return x / (norm_factor + eps)
9
10
11def get_state_dict(net_type: str = 'alex', version: str = '0.1'):

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected