MCPcopy Create free account
hub / github.com/MegaScenes/nvs / __init__

Method __init__

ldm/modules/diffusionmodules/openaimodel.py:125–130  ·  view source on GitHub ↗
(self, channels, out_channels=None, ks=5)

Source from the content-addressed store, hash-verified

123class TransposedUpsample(nn.Module):
124 'Learned 2x upsampling without padding'
125 def __init__(self, channels, out_channels=None, ks=5):
126 super().__init__()
127 self.channels = channels
128 self.out_channels = out_channels or channels
129
130 self.up = nn.ConvTranspose2d(self.channels,self.out_channels,kernel_size=ks,stride=2)
131
132 def forward(self,x):
133 return self.up(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected