summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--models/base_model.py1
-rw-r--r--models/cycle_gan_model.py3
-rw-r--r--models/networks.py1
-rw-r--r--models/pix2pix_model.py5
-rw-r--r--options/base_options.py2
-rw-r--r--scripts/test_pix2pix.sh2
7 files changed, 5 insertions, 11 deletions
diff --git a/README.md b/README.md
index 4bb1595..abccd2f 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,7 @@ python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix
- Test the model (`bash ./scripts/test_pix2pix.sh`):
```bash
#!./scripts/test_pix2pix.sh
-python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --align_data
+python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --align_data --use_dropout
```
The test results will be saved to a html file here: `./results/facades_pix2pix/latest_val/index.html`.
diff --git a/models/base_model.py b/models/base_model.py
index ce18635..9b92bb4 100644
--- a/models/base_model.py
+++ b/models/base_model.py
@@ -1,6 +1,5 @@
import os
import torch
-from pdb import set_trace as st
class BaseModel():
def name(self):
diff --git a/models/cycle_gan_model.py b/models/cycle_gan_model.py
index d361e47..451002d 100644
--- a/models/cycle_gan_model.py
+++ b/models/cycle_gan_model.py
@@ -2,7 +2,6 @@ import numpy as np
import torch
import os
from collections import OrderedDict
-from pdb import set_trace as st
from torch.autograd import Variable
import itertools
import util.util as util
@@ -72,7 +71,7 @@ class CycleGANModel(BaseModel):
print('-----------------------------------------------')
def set_input(self, input):
- AtoB = self.opt.which_direction is 'AtoB'
+ AtoB = self.opt.which_direction == 'AtoB'
input_A = input['A' if AtoB else 'B']
input_B = input['B' if AtoB else 'A']
self.input_A.resize_(input_A.size()).copy_(input_A)
diff --git a/models/networks.py b/models/networks.py
index 2aea150..b0f3b11 100644
--- a/models/networks.py
+++ b/models/networks.py
@@ -1,7 +1,6 @@
import torch
import torch.nn as nn
from torch.autograd import Variable
-from pdb import set_trace as st
import numpy as np
###############################################################################
diff --git a/models/pix2pix_model.py b/models/pix2pix_model.py
index 0e02ebf..34e0bac 100644
--- a/models/pix2pix_model.py
+++ b/models/pix2pix_model.py
@@ -2,13 +2,11 @@ import numpy as np
import torch
import os
from collections import OrderedDict
-from pdb import set_trace as st
from torch.autograd import Variable
import util.util as util
from util.image_pool import ImagePool
from .base_model import BaseModel
from . import networks
-from pdb import set_trace as st
class Pix2PixModel(BaseModel):
def name(self):
@@ -55,7 +53,7 @@ class Pix2PixModel(BaseModel):
print('-----------------------------------------------')
def set_input(self, input):
- AtoB = self.opt.which_direction is 'AtoB'
+ AtoB = self.opt.which_direction == 'AtoB'
input_A = input['A' if AtoB else 'B']
input_B = input['B' if AtoB else 'A']
self.input_A.resize_(input_A.size()).copy_(input_A)
@@ -108,7 +106,6 @@ class Pix2PixModel(BaseModel):
self.loss_G.backward()
def optimize_parameters(self):
- # st()
self.forward()
self.optimizer_D.zero_grad()
diff --git a/options/base_options.py b/options/base_options.py
index 4074746..f03a687 100644
--- a/options/base_options.py
+++ b/options/base_options.py
@@ -1,7 +1,7 @@
import argparse
import os
from util import util
-from pdb import set_trace as st
+
class BaseOptions():
def __init__(self):
self.parser = argparse.ArgumentParser()
diff --git a/scripts/test_pix2pix.sh b/scripts/test_pix2pix.sh
index d5c2960..0d19934 100644
--- a/scripts/test_pix2pix.sh
+++ b/scripts/test_pix2pix.sh
@@ -1 +1 @@
-python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --align_data
+python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --align_data --use_dropout