MCPcopy Create free account
hub / github.com/OpenTalker/StyleHEAT / __init__

Method __init__

models/styleheat/base_function.py:161–174  ·  view source on GitHub ↗
(self, norm_nc, feature_nc)

Source from the content-addressed store, hash-verified

159
160class ADAIN(nn.Module):
161 def __init__(self, norm_nc, feature_nc):
162 super().__init__()
163
164 self.param_free_norm = nn.InstanceNorm2d(norm_nc, affine=False)
165
166 nhidden = 128
167 use_bias = True
168
169 self.mlp_shared = nn.Sequential(
170 nn.Linear(feature_nc, nhidden, bias=use_bias),
171 nn.ReLU()
172 )
173 self.mlp_gamma = nn.Linear(nhidden, norm_nc, bias=use_bias)
174 self.mlp_beta = nn.Linear(nhidden, norm_nc, bias=use_bias)
175
176 def forward(self, x, feature):
177 # Part 1. generate parameter-free normalized activations

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected