MCPcopy Create free account
hub / github.com/CompVis/diff2flow / TransposedUpsample

Class TransposedUpsample

diff2flow/models/unet/openaimodel.py:124–134  ·  view source on GitHub ↗

Learned 2x upsampling without padding

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected