MCPcopy
hub / github.com/zai-org/CogVideo / ResidualUnit

Function ResidualUnit

sat/sgm/modules/autoencoding/magvit2_pytorch.py:843–852  ·  view source on GitHub ↗
(dim, kernel_size: Union[int, Tuple[int, int, int]], pad_mode: str = "constant")

Source from the content-addressed store, hash-verified

841
842@beartype
843def ResidualUnit(dim, kernel_size: Union[int, Tuple[int, int, int]], pad_mode: str = "constant"):
844 net = Sequential(
845 CausalConv3d(dim, dim, kernel_size, pad_mode=pad_mode),
846 nn.ELU(),
847 nn.Conv3d(dim, dim, 1),
848 nn.ELU(),
849 SqueezeExcite(dim),
850 )
851
852 return Residual(net)
853
854
855@beartype

Callers 1

__init__Method · 0.85

Calls 4

SequentialFunction · 0.85
SqueezeExciteClass · 0.85
ResidualClass · 0.85
CausalConv3dClass · 0.70

Tested by

no test coverage detected