Unpack input data from the dataloader and perform necessary pre-processing steps. Parameters: input (dict): include the data itself and its metadata information. The option 'direction' can be used to swap domain A and domain B.
(self, input)
| 167 | self.optimizer_F.step() |
| 168 | |
| 169 | def set_input(self, input): |
| 170 | """Unpack input data from the dataloader and perform necessary pre-processing steps. |
| 171 | Parameters: |
| 172 | input (dict): include the data itself and its metadata information. |
| 173 | The option 'direction' can be used to swap domain A and domain B. |
| 174 | """ |
| 175 | AtoB = self.opt.direction == 'AtoB' |
| 176 | self.real_A = input['A' if AtoB else 'B'].to(self.device) |
| 177 | self.real_B = input['B' if AtoB else 'A'].to(self.device) |
| 178 | self.image_paths = input['A_paths' if AtoB else 'B_paths'] |
| 179 | |
| 180 | def forward(self): |
| 181 | """Run forward pass; called by both functions <optimize_parameters> and <test>.""" |
no outgoing calls
no test coverage detected