Method
forward
(
self,
x_spatial: torch.Tensor,
x_temporal: torch.Tensor,
image_only_indicator: Optional[torch.Tensor] = None,
)
Source from the content-addressed store, hash-verified
| 782 | return alpha |
| 783 | |
| 784 | def forward( |
| 785 | self, |
| 786 | x_spatial: torch.Tensor, |
| 787 | x_temporal: torch.Tensor, |
| 788 | image_only_indicator: Optional[torch.Tensor] = None, |
| 789 | ) -> torch.Tensor: |
| 790 | alpha = self.get_alpha(image_only_indicator, x_spatial.ndim) |
| 791 | alpha = alpha.to(x_spatial.dtype) |
| 792 | |
| 793 | if self.switch_spatial_to_temporal_mix: |
| 794 | alpha = 1.0 - alpha |
| 795 | |
| 796 | x = alpha * x_spatial + (1.0 - alpha) * x_temporal |
| 797 | return x |
Callers
nothing calls this directly
Tested by
no test coverage detected