Last active
February 21, 2025 05:16
-
-
Save tam17aki/57d3be93e62d71f0137ff0df1c3120bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURDIR=$(cd $(dirname $0);pwd) | |
LOGDIR=${CURDIR}/log | |
mkdir -p ${LOGDIR} | |
SOURCE=hopnet_dynamics.c | |
TARGET=hopnet_dynamics | |
CFLAGS="-Ofast -Wall" | |
N_NEURONS=1000 # The number of neurons | |
N_PATTERNS=80 # The maximum number of patterns | |
N_ITERATIONS=25 # Maximum number of iterations for recall | |
SELF_CONNECT=false | |
echo "gcc ${CFLAGS} ${SOURCE} -o ${TARGET}" | |
gcc ${CFLAGS} ${SOURCE} -o ${TARGET} | |
for i in 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.5 0.6 0.7 0.8 0.9; do | |
LOG_FILE=log_${i}.txt | |
echo -n "Initial similarity ${i} ... " | |
${CURDIR}/${TARGET} -n ${N_NEURONS} -p ${N_PATTERNS} \ | |
-i ${N_ITERATIONS} -s ${i} -c ${SELF_CONNECT} \ | |
-f ${LOGDIR}/${LOG_FILE} | |
echo "done" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment