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

Method __init__

sat/vae_modules/cp_enc_dec.py:572–580  ·  view source on GitHub ↗
(self, in_channels, with_conv, compress_time=False, out_channels=None)

Source from the content-addressed store, hash-verified

570
571class DownSample3D(nn.Module):
572 def __init__(self, in_channels, with_conv, compress_time=False, out_channels=None):
573 super().__init__()
574 self.with_conv = with_conv
575 if out_channels is None:
576 out_channels = in_channels
577 if self.with_conv:
578 # no asymmetric padding in torch conv, must do it ourselves
579 self.conv = torch.nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=2, padding=0)
580 self.compress_time = compress_time
581
582 def forward(self, x):
583 if self.compress_time and x.shape[2] > 1:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected