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

Method __init__

sat/sgm/modules/autoencoding/magvit2_pytorch.py:770–777  ·  view source on GitHub ↗
(self, dim, dim_out=None)

Source from the content-addressed store, hash-verified

768
769class TimeUpsample2x(Module):
770 def __init__(self, dim, dim_out=None):
771 super().__init__()
772 dim_out = default(dim_out, dim)
773 conv = nn.Conv1d(dim, dim_out * 2, 1)
774
775 self.net = nn.Sequential(conv, nn.SiLU(), Rearrange("b (c p) t -> b c (t p)", p=2))
776
777 self.init_conv_(conv)
778
779 def init_conv_(self, conv):
780 o, i, t = conv.weight.shape

Callers

nothing calls this directly

Calls 3

init_conv_Method · 0.95
defaultFunction · 0.70
__init__Method · 0.45

Tested by

no test coverage detected