(self, x)
| 155 | self.model.train = disabled_train |
| 156 | |
| 157 | def forward(self, x): |
| 158 | # x in 0..1 as produced by calling self.transform on a 0..1 float64 numpy array |
| 159 | # NOTE: we expect that the correct transform has been called during dataloading. |
| 160 | with torch.no_grad(): |
| 161 | prediction = self.model(x) |
| 162 | prediction = torch.nn.functional.interpolate( |
| 163 | prediction.unsqueeze(1), |
| 164 | size=x.shape[2:], |
| 165 | mode="bicubic", |
| 166 | align_corners=False, |
| 167 | ) |
| 168 | assert prediction.shape == (x.shape[0], 1, x.shape[2], x.shape[3]) |
| 169 | return prediction |
| 170 |
nothing calls this directly
no outgoing calls
no test coverage detected