MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

sat/sgm/modules/diffusionmodules/model.py:68–73  ·  view source on GitHub ↗
(self, in_channels, with_conv)

Source from the content-addressed store, hash-verified

66
67class Downsample(nn.Module):
68 def __init__(self, in_channels, with_conv):
69 super().__init__()
70 self.with_conv = with_conv
71 if self.with_conv:
72 # no asymmetric padding in torch conv, must do it ourselves
73 self.conv = torch.nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=2, padding=0)
74
75 def forward(self, x):
76 if self.with_conv:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected