未验证 提交 776fe801 编写于 作者: Hao-qiang's avatar Hao-qiang 提交者: GitHub

fix photo2cartoon configs (#144)

上级 5972bf7f
epochs: 300 epochs: 300
output_dir: output_dir output_dir: output_dir
adv_weight: 1.0
cycle_weight: 50.0
identity_weight: 10.0
cam_weight: 1000.0
model: model:
name: UGATITModel name: UGATITModel
...@@ -25,57 +21,102 @@ model: ...@@ -25,57 +21,102 @@ model:
input_nc: 3 input_nc: 3
ndf: 32 ndf: 32
n_layers: 5 n_layers: 5
l1_criterion:
name: L1Loss
mse_criterion:
name: MSELoss
bce_criterion:
name: BCEWithLogitsLoss
adv_weight: 1.0
cycle_weight: 50.0
identity_weight: 10.0
cam_weight: 1000.0
dataset: dataset:
train: train:
name: UnpairedDataset name: UnpairedDataset
dataroot: data/photo2cartoon dataroot_a: data/photo2cartoon/trainA
dataroot_b: data/photo2cartoon/trainB
num_workers: 0 num_workers: 0
phase: train batch_size: 1
max_dataset_size: inf is_train: True
direction: AtoB max_size: inf
input_nc: 3 preprocess:
output_nc: 3 - name: LoadImageFromFile
serial_batches: False key: A
transforms: - name: LoadImageFromFile
- name: Resize key: B
size: [286, 286] - name: Transforms
interpolation: 'bilinear' #'bicubic' #cv2.INTER_CUBIC input_keys: [A, B]
- name: RandomCrop pipeline:
size: [256, 256] - name: Resize
- name: RandomHorizontalFlip size: [286, 286]
prob: 0.5 interpolation: 'bicubic' #cv2.INTER_CUBIC
- name: Transpose keys: ['image', 'image']
- name: Normalize - name: RandomCrop
mean: [127.5, 127.5, 127.5] size: [256, 256]
std: [127.5, 127.5, 127.5] keys: ['image', 'image']
- name: RandomHorizontalFlip
prob: 0.5
keys: ['image', 'image']
- name: Transpose
keys: ['image', 'image']
- name: Normalize
mean: [127.5, 127.5, 127.5]
std: [127.5, 127.5, 127.5]
keys: ['image', 'image']
test: test:
name: SingleDataset name: UnpairedDataset
dataroot: data/photo2cartoon/testA dataroot_a: data/photo2cartoon/testA
max_dataset_size: inf dataroot_b: data/photo2cartoon/testB
direction: AtoB num_workers: 0
input_nc: 3 batch_size: 1
output_nc: 3 max_size: inf
serial_batches: False is_train: False
transforms: preprocess:
- name: Resize - name: LoadImageFromFile
size: [256, 256] key: A
interpolation: 'bilinear' #cv2.INTER_CUBIC - name: LoadImageFromFile
- name: Transpose key: B
- name: Normalize - name: Transfroms
mean: [127.5, 127.5, 127.5] input_keys: [A, B]
std: [127.5, 127.5, 127.5] pipeline:
- name: Resize
optimizer: size: [256, 256]
name: Adam interpolation: 'bicubic' #cv2.INTER_CUBIC
beta1: 0.5 keys: ['image', 'image']
weight_decay: 0.0001 - name: Transpose
keys: ['image', 'image']
- name: Normalize
mean: [127.5, 127.5, 127.5]
std: [127.5, 127.5, 127.5]
keys: ['image', 'image']
lr_scheduler: lr_scheduler:
name: linear name: LinearDecay
learning_rate: 0.0001 learning_rate: 0.0001
start_epoch: 150 start_epoch: 150
decay_epochs: 150 decay_epochs: 150
# will get from real dataset
iters_per_epoch: 1
optimizer:
optimG:
name: Adam
net_names:
- genA2B
- genB2A
weight_decay: 0.0001
beta1: 0.5
optimD:
name: Adam
net_names:
- disGA
- disGB
- disLA
- disLB
weight_decay: 0.0001
beta1: 0.5
log_config: log_config:
interval: 10 interval: 10
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册