(self, x)
| 29 | return x |
| 30 | |
| 31 | def post_process(self, x): |
| 32 | x = x.cpu().float().clamp(0., 1.) * 255. |
| 33 | x = x.permute(0, 2, 3, 1) # [b, h, w, c] |
| 34 | x = x.to(torch.uint8) |
| 35 | return x |
| 36 | |
| 37 | def encode(self, x): |
| 38 | return self.encoder(x.to(self.encoder.dtype))['encoded'] |
no outgoing calls
no test coverage detected