MCPcopy Create free account
hub / github.com/amdegroot/ssd.pytorch / __init__

Method __init__

layers/modules/l2norm.py:8–14  ·  view source on GitHub ↗
(self,n_channels, scale)

Source from the content-addressed store, hash-verified

6
7class L2Norm(nn.Module):
8 def __init__(self,n_channels, scale):
9 super(L2Norm,self).__init__()
10 self.n_channels = n_channels
11 self.gamma = scale or None
12 self.eps = 1e-10
13 self.weight = nn.Parameter(torch.Tensor(self.n_channels))
14 self.reset_parameters()
15
16 def reset_parameters(self):
17 init.constant_(self.weight,self.gamma)

Callers

nothing calls this directly

Calls 1

reset_parametersMethod · 0.95

Tested by

no test coverage detected