Pre-sampled latents T.Tensor (B, L, Z) -> float tensor (B, L, D)
(self, sampled_latents: T.Tensor)
| 38 | return (x + T.sqrt(T.square(x) + 4)) / 2 |
| 39 | |
| 40 | def input(self, sampled_latents: T.Tensor) -> T.Tensor: |
| 41 | """Pre-sampled latents T.Tensor (B, L, Z) -> float tensor (B, L, D)""" |
| 42 | hidden = self.input_projection(sampled_latents) |
| 43 | return hidden |
| 44 | |
| 45 | def output(self, h: T.Tensor) -> Tuple[T.Tensor, T.Tensor, T.Tensor]: |
| 46 | """float tensor (B, L, D) -> Tuple of locs, scales, and weights""" |