(self, batch, k)
| 118 | return dec, posterior |
| 119 | |
| 120 | def get_input(self, batch, k): |
| 121 | x = batch[k] |
| 122 | if x.dim() == 5 and self.input_dim == 4: |
| 123 | b,c,t,h,w = x.shape |
| 124 | self.b = b |
| 125 | self.t = t |
| 126 | x = rearrange(x, 'b c t h w -> (b t) c h w') |
| 127 | |
| 128 | return x |
| 129 | |
| 130 | def training_step(self, batch, batch_idx, optimizer_idx): |
| 131 | inputs = self.get_input(batch, self.image_key) |
no outgoing calls
no test coverage detected