MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / forward

Method forward

code/dc_ldm/modules/diffusionmodules/model.py:72–79  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

70 padding=0)
71
72 def forward(self, x):
73 if self.with_conv:
74 pad = (0,1,0,1)
75 x = torch.nn.functional.pad(x, pad, mode="constant", value=0)
76 x = self.conv(x)
77 else:
78 x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2)
79 return x
80
81
82class ResnetBlock(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected