Commit 416791ba authored by lvs's avatar lvs

added adadelta grad minimizer

parent 169ca1f5
......@@ -52,7 +52,8 @@ K3_NAME="perform_LS"
K4_NAME="gpu_gen_and_eval_newpops"
K5_NAME="gradient_minSD"
K6_NAME="gradient_minFire"
K_NAMES=-DK1=$(K1_NAME) -DK2=$(K2_NAME) -DK3=$(K3_NAME) -DK4=$(K4_NAME) -DK5=$(K5_NAME) -DK6=$(K6_NAME)
K7_NAME="gradient_minAD"
K_NAMES=-DK1=$(K1_NAME) -DK2=$(K2_NAME) -DK3=$(K3_NAME) -DK4=$(K4_NAME) -DK5=$(K5_NAME) -DK6=$(K6_NAME) -DK7=$(K7_NAME)
# Kernel flags
KFLAGS=-DKRNL_SOURCE=$(KRNL_DIR)/$(KRNL_MAIN) -DKRNL_DIRECTORY=$(KRNL_DIR) -DKCMN_DIRECTORY=$(KCMN_DIR) $(K_NAMES)
......@@ -206,7 +207,7 @@ PDB := 3ce3
NRUN := 100
POPSIZE := 150
TESTNAME := test
TESTLS := sw
TESTLS := ad
test: odock
......
......@@ -697,3 +697,4 @@ if (get_local_id (0) == 0) {
#include "calcgradient.cl"
#include "kernel_sd.cl"
#include "kernel_fire.cl"
#include "kernel_ad.cl"
This diff is collapsed.
......@@ -293,6 +293,8 @@ void get_commandpars(const int* argc,
//Argument: local search method:
// "sw": Solis-Wetts
// "sd": Steepest-Descent
// "fire": FIRE
// "ad": Ada-Delta
// "bfgs": Broyden-Fletcher-Goldfarb-Shanno (to be implemented)
if (strcmp("-lsmet", argv [i]) == 0)
{
......@@ -314,8 +316,12 @@ void get_commandpars(const int* argc,
strcpy(mypars->ls_method, temp);
//mypars->max_num_of_iters = 30;
}
else if (strcmp(temp, "ad") == 0) {
strcpy(mypars->ls_method, temp);
//mypars->max_num_of_iters = 30;
}
else {
printf("Warning: value of -lsmet argument ignored. Value must be a valid string: \"sw\", \"sd\", \"fire\".\n");
printf("Warning: value of -lsmet argument ignored. Value must be a valid string: \"sw\", \"sd\", \"fire\", \"ad\".\n");
}
}
......
This diff is collapsed.
......@@ -21,6 +21,7 @@ IN_KERNEL4=$KERNEL_DIR/"kernel4.cl"
IN_KERNELb=$KERNEL_DIR/"calcgradient.cl"
IN_KERNEL5=$KERNEL_DIR/"kernel_sd.cl"
IN_KERNEL6=$KERNEL_DIR/"kernel_fire.cl"
IN_KERNEL7=$KERNEL_DIR/"kernel_ad.cl"
echo " "
echo "Stringified input kernel-files: "
......@@ -33,6 +34,7 @@ echo $IN_KERNEL4
echo $IN_KERNELb
echo $IN_KERNEL5
echo $IN_KERNEL6
echo $IN_KERNEL7
# output file
OUT=host/inc/stringify.h
......@@ -61,6 +63,7 @@ sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/\\n"/' $IN_KERNEL4 >> $TMP
sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/\\n"/' $IN_KERNELb >> $TMP
sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/\\n"/' $IN_KERNEL5 >> $TMP
sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/\\n"/' $IN_KERNEL6 >> $TMP
sed 's/\\/\\\\/g;s/"/\\"/g;s/^/"/;s/$/\\n"/' $IN_KERNEL7 >> $TMP
echo ";" >>$TMP
echo "#endif // End of STRINGIFY_H" >>$TMP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment