MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / reshape_view

Function reshape_view

gsplat/rendering.py:244–251  ·  view source on GitHub ↗
(C: int, world_view: torch.Tensor, N_world: list)

Source from the content-addressed store, hash-verified

242 assert render_mode in ["RGB", "D", "ED", "RGB+D", "RGB+ED"], render_mode
243
244 def reshape_view(C: int, world_view: torch.Tensor, N_world: list) -> torch.Tensor:
245 view_list = list(
246 map(
247 lambda x: x.split(int(x.shape[0] / C), dim=0),
248 world_view.split([C * N_i for N_i in N_world], dim=0),
249 )
250 )
251 return torch.stack([torch.cat(l, dim=0) for l in zip(*view_list)], dim=0)
252
253 if sh_degree is None:
254 # treat colors as post-activation values, should be in shape [N, D] or [C, N, D]

Callers 1

rasterizationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected