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

Class ConstantInput

models/float/styledecoder.py:285–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283
284
285class ConstantInput(nn.Module):
286 def __init__(self, channel, size=4):
287 super().__init__()
288
289 self.input = nn.Parameter(torch.randn(1, channel, size, size))
290
291 def forward(self, input):
292 batch = input.shape[0]
293 out = self.input.repeat(batch, 1, 1, 1)
294
295 return out
296
297
298class StyledConv(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected