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

Class FusedLeakyReLU

models/float/styledecoder.py:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44class FusedLeakyReLU(nn.Module):
45 def __init__(self, channel, negative_slope=0.2, scale=2 ** 0.5):
46 super().__init__()
47 self.bias = nn.Parameter(torch.zeros(1, channel, 1, 1))
48 self.negative_slope = negative_slope
49 self.scale = scale
50
51 def forward(self, input):
52 return fused_leaky_relu(input, self.bias, self.negative_slope, self.scale)
53
54
55class PixelNorm(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected