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

Method __init__

sat/sgm/modules/autoencoding/vqvae/movq_enc_3d.py:145–153  ·  view source on GitHub ↗
(self, in_channels, with_conv, compress_time=False, out_channels=None)

Source from the content-addressed store, hash-verified

143
144class DownSample3D(nn.Module):
145 def __init__(self, in_channels, with_conv, compress_time=False, out_channels=None):
146 super().__init__()
147 self.with_conv = with_conv
148 if out_channels is None:
149 out_channels = in_channels
150 if self.with_conv:
151 # no asymmetric padding in torch conv, must do it ourselves
152 self.conv = torch.nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=2, padding=0)
153 self.compress_time = compress_time
154
155 def forward(self, x):
156 if self.compress_time:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected