forked from LynnHo/CycleGAN-Tensorflow-2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpush.py
More file actions
41 lines (27 loc) · 1.24 KB
/
push.py
File metadata and controls
41 lines (27 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os, argparse
import path, vm
# datasets = ['cats2clouds', 'porn2figure', 'porn2flora', 'porn2miami', 'porn2schiele', 'selfies2astro', 'selfies2illust', 'selfies2renaiss']
# datasets = [porn2flora', 'porn2miami','selfies2astro','selfies2renaiss']
datasets = ['cats2clouds']
def command(txt):
print "******************************************************************"
print txt
os.system(txt)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--gpu", action='store_true')
args = parser.parse_args()
INSTANCE = vm.RELAY_INSTANCE
if args.gpu:
INSTANCE = vm.GPU_INSTANCE
for ds in datasets:
path.init(ds)
# mkdir datasets
command('ssh %s "mkdir -p /home/stefan/git/%s/%s; mkdir -p /home/stefan/git/%s/%s;"'\
% (INSTANCE, path.GIT_REPO_NAME, path.trainA, path.GIT_REPO_NAME, path.trainB))
# trainA
command("""rsync -rcPz -e ssh --delete %s/ %s:/home/stefan/git/%s/%s/""" \
% (path.trainA, INSTANCE, path.GIT_REPO_NAME, path.trainA))
# trainB
command("""rsync -rcPz -e ssh --delete %s/ %s:/home/stefan/git/%s/%s/""" \
% (path.trainB, INSTANCE, path.GIT_REPO_NAME, path.trainB))