MCPcopy Create free account
hub / github.com/microsoft/TRELLIS / ChannelLayerNorm32

Class ChannelLayerNorm32

trellis/modules/norm.py:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class ChannelLayerNorm32(LayerNorm32):
19 def forward(self, x: torch.Tensor) -> torch.Tensor:
20 DIM = x.dim()
21 x = x.permute(0, *range(2, DIM), 1).contiguous()
22 x = super().forward(x)
23 x = x.permute(0, DIM-1, *range(1, DIM-1)).contiguous()
24 return x
25

Callers 1

norm_layerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected