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)
| 149 | self.optimizer_F.step() |
| 150 | |
| 151 | def set_input(self, input): |
| 152 | """Unpack input data from the dataloader and perform necessary pre-processing steps. |
| 153 | Parameters: |
| 154 | input (dict): include the data itself and its metadata information. |
| 155 | The option 'direction' can be used to swap domain A and domain B. |
| 156 | """ |
| 157 | AtoB = self.opt.direction == 'AtoB' |
| 158 | self.real_A = input['A' if AtoB else 'B'].to(self.device) |
| 159 | self.real_B = input['B' if AtoB else 'A'].to(self.device) |
| 160 | self.image_paths = input['A_paths' if AtoB else 'B_paths'] |
| 161 | |
| 162 | def forward(self): |
| 163 | """Run forward pass; called by both functions <optimize_parameters> and <test>.""" |
no outgoing calls
no test coverage detected