File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ set -eu
10
10
# ## Path to your CANDLEized model's main Python script###
11
11
CANDLE_MODEL=/usr/local/Benchmarks/Pilot1/Uno/uno_baseline_keras2.py
12
12
13
- if (( $# < 2 )) ; then
14
- echo " Uno/train.sh: Illegal number of parameters: given: ${# } "
13
+ set -x
14
+
15
+ ARGC=$#
16
+
17
+ if (( $ARGC < 2 )) ; then
18
+ echo " Uno/train.sh: Illegal number of parameters: given: ${ARGC} "
15
19
echo " CUDA_VISIBLE_DEVICES and CANDLE_DATA_DIR are required"
16
20
exit -1
17
21
fi
@@ -20,12 +24,11 @@ CUDA_VISIBLE_DEVICES=$1 ; shift
20
24
CANDLE_DATA_DIR=$1 ; shift
21
25
CANDLE_CONFIG=0
22
26
23
- set -x
24
- if (( $# == 2 )) ; then
27
+ if (( $ARGC == 2 )) ; then
25
28
CMD=( python ${CANDLE_MODEL} )
26
29
echo " CMD2 = ${CMD[@]} "
27
- elif (( $# >= 3 )) ; then
28
- # if original $3 is a file, set candle_config and passthrough $@
30
+ elif (( $ARGC >= 3 )) ; then
31
+ # If original $3 is a file, set candle_config and passthrough $@
29
32
CANDLE_CONFIG=$1
30
33
if [[ -f $CANDLE_CONFIG ]] ; then
31
34
echo " Uno/train.sh: found CANDLE_CONFIG=$CANDLE_CONFIG "
You can’t perform that action at this time.
0 commit comments