(self, x, timestamp=None)
| 67 | self.transformer_encoder.set_grad_checkpointing(opt.checkpointing) |
| 68 | |
| 69 | def forward(self, x, timestamp=None): |
| 70 | assert x.dim() == 5, f"Input shape should be [b, #views, c, h, w] but {x.shape} is given" |
| 71 | batch_size, input_views = x.shape[0], x.shape[1] |
| 72 | |
| 73 | features = self.transformer_encoder(x, timestamp) # [B, V, N, D] |
| 74 | return features |
| 75 | |
| 76 | class SplatDecoder(nn.Module): |
| 77 | def __init__(self, opt: Options, **kwargs): |