#!/bin/bash # Tuning grid for KNP feature learning (K=64, 20000 crops); each line: name rate decay det_thr inhib cd ~/run/altai-objects/fgrid export LD_LIBRARY_PATH=$HOME/knp-build/bin:$HOME/deps/lib one() { n=$1; [ -f $n.score ] && return env KNP_DELTA_RULE=$2 KNP_DELTA_DECAY=$3 KNP_DELTA_WDECAY=${7:-0} KNP_DELTA_LAG=1 KNP_DET_THR=$4 KNP_INHIB=$5 KNP_SUMTHR=${6:-0} \ ../altai_objects features /home/int/run/cifar/vehicles/knp_crops.bin ${NPATCH:-20000} 64 $n.bin \ $HOME/run/delta-cpu/libknp-cpu-delta-backend.so 2>&1 | grep "^features" > $n.log ~/anvenv/bin/python /mnt/c/knp/altai-objects/score_features.py $n.bin 64 > $n.score 2>&1; } export -f one cat ${SPECFILE:-/dev/stdin} | xargs -P ${JOBS:-12} -L 1 bash -c 'one "$@"' _