MCPcopy Create free account
hub / github.com/DingXiaoH/RepVGG / __init__

Method __init__

tools/insert_bn.py:72–74  ·  view source on GitHub ↗
(self, num_features)

Source from the content-addressed store, hash-verified

70# This is designed to insert BNStat layer between Conv2d(without bias) and its bias
71class BiasAdd(nn.Module):
72 def __init__(self, num_features):
73 super(BiasAdd, self).__init__()
74 self.bias = torch.nn.Parameter(torch.Tensor(num_features))
75 def forward(self, x):
76 return x + self.bias.view(1, -1, 1, 1)
77

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected