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)
| 127 | self.optimizer_F.step() |
| 128 | |
| 129 | def set_input(self, input): |
| 130 | """Unpack input data from the dataloader and perform necessary pre-processing steps. |
| 131 | Parameters: |
| 132 | input (dict): include the data itself and its metadata information. |
| 133 | The option 'direction' can be used to swap domain A and domain B. |
| 134 | """ |
| 135 | AtoB = self.opt.direction == 'AtoB' |
| 136 | self.real_A = input['A' if AtoB else 'B'].to(self.device) |
| 137 | self.real_B = input['B' if AtoB else 'A'].to(self.device) |
| 138 | self.image_paths = input['A_paths' if AtoB else 'B_paths'] |
| 139 | |
| 140 | def forward(self): |
| 141 | """Run forward pass; called by both functions <optimize_parameters> and <test>.""" |
no outgoing calls
no test coverage detected