(self, batch, k)
| 424 | return self.p_losses(x, t, *args, **kwargs) |
| 425 | |
| 426 | def get_input(self, batch, k): |
| 427 | x = batch[k] |
| 428 | if len(x.shape) == 3: |
| 429 | x = x[..., None] |
| 430 | x = rearrange(x, 'b h w c -> b c h w') |
| 431 | x = x.to(memory_format=torch.contiguous_format).float() |
| 432 | return x |
| 433 | |
| 434 | def shared_step(self, batch): |
| 435 | x = self.get_input(batch, self.first_stage_key) |
no outgoing calls
no test coverage detected