MCPcopy Create free account
hub / github.com/PrathamLearnsToCode/paper2code / forward

Method forward

skills/paper2code/worked/ddpm/src/model.py:210–212  ·  view source on GitHub ↗
(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

208 self.conv = nn.Conv2d(channels, channels, kernel_size=3, padding=1)
209
210 def forward(self, x: torch.Tensor) -> torch.Tensor:
211 x = F.interpolate(x, scale_factor=2, mode="nearest")
212 return self.conv(x) # (batch, C, H, W) -> (batch, C, 2H, 2W)
213
214
215# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected