|
from .tmux_launcher import Options, TmuxLauncher |
|
|
|
|
|
class Launcher(TmuxLauncher): |
|
|
|
|
|
def commands(self): |
|
opt = Options() |
|
|
|
|
|
opt.set(dataroot="~/datasets/cityscapes/", |
|
model="contrastive_cycle_gan", |
|
pool_size=0, |
|
no_dropout="", |
|
init_type="xavier", |
|
batch_size=1, |
|
display_freq=400, |
|
evaluation_metrics="fid,cityscapes", |
|
evaluation_freq=10000, |
|
direction="BtoA", |
|
use_recommended_options="", |
|
nce_idt_freq=0.1, |
|
) |
|
|
|
|
|
commands = [ |
|
|
|
|
|
|
|
|
|
"python train.py " + str(opt.clone().set( |
|
name="cityscapes_placeholder_noidt", |
|
nce_idt=False, |
|
)), |
|
|
|
|
|
|
|
|
|
"python train.py " + str(opt.clone().set( |
|
name="cityscapes_placeholder_singlelayer", |
|
nce_layers="16", |
|
).remove("nce_idt_freq")), |
|
|
|
|
|
|
|
|
|
"python train.py " + str(opt.clone().set( |
|
name="cityscapes_placeholder_multigpu", |
|
nce_layers="16", |
|
batch_size=4, |
|
gpu_ids="0,1", |
|
)), |
|
|
|
] |
|
|
|
return commands |
|
|
|
|
|
|
|
def test_commands(self): |
|
opt = Options() |
|
opt.set(dataroot="~/datasets/cityscapes_unaligned/cityscapes", |
|
model="contrastive_cycle_gan", |
|
no_dropout="", |
|
init_type="xavier", |
|
batch_size=1, |
|
direction="BtoA", |
|
epoch=40, |
|
phase='train', |
|
evaluation_metrics="fid", |
|
) |
|
|
|
commands = [ |
|
"python test.py " + str(opt.clone().set( |
|
name="cityscapes_nce", |
|
nce_layers="0,8,16", |
|
direction="BtoA", |
|
)), |
|
] |
|
|
|
return commands |
|
|