MCPcopy
hub / github.com/TencentARC/Pixal3D / forward

Method forward

pixal3d/models/sparse_structure_vae.py:93–98  ·  view source on GitHub ↗
(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

91 assert in_channels == out_channels, "Nearest mode requires in_channels to be equal to out_channels"
92
93 def forward(self, x: torch.Tensor) -> torch.Tensor:
94 if hasattr(self, "conv"):
95 x = self.conv(x)
96 return pixel_shuffle_3d(x, 2)
97 else:
98 return F.interpolate(x, scale_factor=2, mode="nearest")
99
100
101class SparseStructureEncoder(nn.Module):

Callers

nothing calls this directly

Calls 1

pixel_shuffle_3dFunction · 0.85

Tested by

no test coverage detected