Run forward pass. This will be called by both functions and .
(self)
| 81 | self.image_paths = input['A_paths' if AtoB else 'B_paths'] # get image paths |
| 82 | |
| 83 | def forward(self): |
| 84 | """Run forward pass. This will be called by both functions <optimize_parameters> and <test>.""" |
| 85 | self.output = self.netG(self.data_A) # generate output image given the input data_A |
| 86 | |
| 87 | def backward(self): |
| 88 | """Calculate losses, gradients, and update network weights; called in every training iteration""" |