-
Notifications
You must be signed in to change notification settings - Fork 1
/
train.sh
executable file
·26 lines (23 loc) · 1.31 KB
/
train.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
#! /bin/bash
if [ "$1" != "--data-root" ]; then
echo "error: --data-root needed"
echo "if --data-root is a relative path then should be relative as if starting from the pix2pix folder"
echo "usage: ./train.sh --data-root ../dataset/celebfaces/face2edge --name edge2face_generation --direction BtoA --torch /root/torch/install/bin/th"
exit 1;
elif [ "$3" != "--name" ]; then
echo "error: --name needed"
echo "usage: ./train.sh --data-root ../dataset/celebfaces/face2edge --name edge2face_generation --direction BtoA --torch /root/torch/install/bin/th"
exit 1;
elif [ "$5" != "--direction" ] ; then
echo "error: --direction needed"
echo "usage: ./train.sh --data-root ../dataset/celebfaces/face2edge --name edge2face_generation --direction BtoA --torch /root/torch/install/bin/th"
exit 1;
elif [ "$7" != "--torch" ] ; then
echo "error: --torch missing"
echo "usage: ./train.sh --data-root ../dataset/celebfaces/face2edge --name edge2face_generation --direction BtoA --torch /root/torch/install/bin/th"
exit 1;
fi
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd $parent_path/pix2pix
time (DATA_ROOT=$2 name=$4 which_direction=$6 $8 train.lua)
#DATA_ROOT=../dataset/celebfaces/face2edge name=edge2face_generation which_direction=BtoA checkpoint_dir=checkpoints th train.lua