MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / TransposedUpsample

Class TransposedUpsample

ldm/modules/diffusionmodules/openaimodel.py:122–132  ·  view source on GitHub ↗

Learned 2x upsampling without padding

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected