MCPcopy Create free account
hub / github.com/deepbrainai-research/float / __init__

Method __init__

models/float/encoder.py:84–96  ·  view source on GitHub ↗
(self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True)

Source from the content-addressed store, hash-verified

82
83class EqualConv2d(nn.Module):
84 def __init__(self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True):
85 super().__init__()
86
87 self.weight = nn.Parameter(torch.randn(out_channel, in_channel, kernel_size, kernel_size))
88 self.scale = 1 / math.sqrt(in_channel * kernel_size ** 2)
89
90 self.stride = stride
91 self.padding = padding
92
93 if bias:
94 self.bias = nn.Parameter(torch.zeros(out_channel))
95 else:
96 self.bias = None
97
98 def forward(self, input):
99

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected