forked from tambetm/fast-style-transfer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path02_train_model.sh
48 lines (34 loc) · 1.13 KB
/
02_train_model.sh
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
42
43
44
45
46
47
48
#!/bin/bash
#The name of the job is fast-style-transfer
#SBATCH -J fast-style-transfer
#The job requires 1 compute node
#SBATCH -N 1
#The job requires 1 task per node
#SBATCH --ntasks-per-node=1
#The maximum walltime of the job is 24 hours
#SBATCH -t 24:00:00
#SBATCH --mem=16G
#If you keep the next two lines, you will get an e-mail notification
#whenever something happens to your job (it starts running, completes or fails)
#SBATCH --mail-type=ALL
#SBATCH --mail-user=
#Keep this line if you need a GPU for your job
#SBATCH --partition=gpu
#Indicates that you need one GPU node
#SBATCH --gres=gpu:tesla:1
#Commands to execute go below
#Load Python
module load python/3.6.3/virtenv
#Activate your environment
source activate tf2-gpu
IMPATH="c53a9eb7f98bd9efe52407712806bfee_XL.jpg"
mkdir ./checkpoints/$IMPATH/
mkdir ./checkpoint-images/$IMPATH/
echo "Starting training."
python style.py --style ./MagicMirror2.0-Trinity/$IMPATH \
--checkpoint-dir ./checkpoints/$IMPATH/ \
--test ./MagicMirror2.0-Trinity/test_image.jpg \
--test-dir ./checkpoint-images/$IMPATH/ \
--checkpoint-iterations 2000 \
--batch-size 4
echo "Training finished."