You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This PyTorch implementation produces results comparable to or better than our or
12
12
13
13
**Note**: The current software works well with PyTorch 0.4+. Check out the older [branch](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/tree/pytorch0.3.1) that supports PyTorch 0.1-0.3.
14
14
15
-
You may find useful information in [training/test tips](docs/tips.md) and [frequently asked questions](docs/qa.md). To implement your own model and dataset, check out our [templates](#implement-your-own-model-and-dataset).
15
+
You may find useful information in [training/test tips](docs/tips.md) and [frequently asked questions](docs/qa.md). To implement your own model and dataset, check out our [templates](#implement-your-own-model-and-dataset).
- (required) call the initialization function of BaseModel
50
50
- define loss function, visualization images, model names, and optimizers
51
51
"""
52
-
BaseModel.initialize(self, opt) # call the initialization method of BaseModel
52
+
BaseModel.__init__(self, opt) # call the initialization method of BaseModel
53
53
# specify the training losses you want to print out. The program will call base_model.get_current_losses to plot the losses to the console and save them to the disk.
54
54
self.loss_names= ['loss_G']
55
55
# specify the images you want to save and display. The program will call base_model.get_current_visuals to save and display these images.
@@ -83,20 +83,19 @@ def set_input(self, input):
83
83
self.path=input['path'] # get image path
84
84
85
85
defforward(self):
86
-
"""Run forward pass. This will be called by both functions <optimize_parameters> and <test>"""
86
+
"""Run forward pass. This will be called by both functions <optimize_parameters> and <test>."""
87
87
self.output=self.netG(self.data_A) # generate output image given the input data_A
88
88
89
89
defbackward(self):
90
-
"""calculate gradients for network G"""
90
+
"""calculate gradients for network weights."""
91
91
# caculate the intermediate results if necessary; here self.output has been computed during function <forward>
92
92
# calculate loss given the input and intermediate results
0 commit comments