| 501 | return encoder_output, target_depth, mask |
| 502 | |
| 503 | def upsampling(self, output): |
| 504 | input_views = output.shape[1] |
| 505 | if self.decoder_ratio > 0: |
| 506 | output = output.reshape(output.shape[0], -1, output.shape[-1]) # [B, V, N, D] -> [B, V*N, D] |
| 507 | output = self.gaussian_upsampler(output) # [B, V*N, D] |
| 508 | output = rearrange(output, 'b (v n) d -> b v n d', v=input_views) |
| 509 | return output |
| 510 | |
| 511 | def forward(self, frames, depths, cond_times=None): |
| 512 | batch_size, input_views = frames.shape[0], frames.shape[1] |