Skip to content

Commit b8c6768

Browse files
authored
Merge pull request #8 from DCM-UPB/update_ffnn_hotfix
Updated lib for changed FFNN interface
2 parents 5e63ed8 + f07a90e commit b8c6768

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

config_template.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ CC="g++"
1010
FLAGS="-std=c++11 -Wall -Werror"
1111

1212
# Optimization flags
13-
OPTFLAGS="-O3"
13+
OPTFLAGS="-O3 -flto"
1414

1515
# Debuggin flags
1616
DEBUGFLAGS="-g -O0"
1717

1818
#FFNN Library (used in ex3)
1919
FFNN_FOLDER="/...../FeedForwardNeuralNetwork"
20-
IFFNN="-I${FFNN_FOLDER}/src/"
20+
IFFNN="-I${FFNN_FOLDER}/include/"
2121
LFFNN="-L${FFNN_FOLDER}"
2222
LIBNAMEFFNN="ffnn"
2323
LIBFFNN="-lffnn"

debug/unittests/run_single_unittest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $CC $FLAGS $DEBUGFLAGS -Wall -I${ROOT_FOLDER}/src/ -c *.cpp
1717

1818
case ${OS_NAME} in
1919
"Linux")
20-
$CC $FLAGS $DEBUGFLAGS -L${ROOT_FOLDER} -Wl,-rpath=${RPATH} -o exe *.o -l${LIBNAME}
20+
$CC $FLAGS $DEBUGFLAGS -L${ROOT_FOLDER} -Wl,-rpath=${ROOT_FOLDER} -o exe *.o -l${LIBNAME}
2121
;;
2222
"Darwin")
2323
$CC $FLAGS $DEBUGFLAGS -L${ROOT_FOLDER} -o exe *.o -l${LIBNAME}

examples/ex3/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class MyInterfaces: public MCISamplingFunctionInterface, public MCIObservableFun
3939
public:
4040
MyInterfaces(FeedForwardNeuralNetwork * bare_ffnn, FeedForwardNeuralNetwork * deriv_ffnn)
4141
: MCISamplingFunctionInterface(1, 1),
42-
MCIObservableFunctionInterface(1, 3+deriv_ffnn->getNBeta()),
42+
MCIObservableFunctionInterface(1, 3+deriv_ffnn->getNVariationalParameters()),
4343
MCICallBackOnAcceptanceInterface(1){
4444
_bare_ffnn = bare_ffnn;
4545
_deriv_ffnn = deriv_ffnn;
@@ -87,6 +87,7 @@ int main(){
8787

8888
FeedForwardNeuralNetwork * deriv_ffnn = new FeedForwardNeuralNetwork(2, 10, 2);
8989
deriv_ffnn->connectFFNN();
90+
deriv_ffnn->assignVariationalParameters();
9091
FeedForwardNeuralNetwork * bare_ffnn = new FeedForwardNeuralNetwork(deriv_ffnn);
9192
deriv_ffnn->addFirstDerivativeSubstrate();
9293
deriv_ffnn->addSecondDerivativeSubstrate();

0 commit comments

Comments
 (0)