init commit

This commit is contained in:
2024-11-12 17:41:10 +01:00
parent 1e4f1f955b
commit 20bc9108d3
146 changed files with 24465 additions and 0 deletions

15
backprop/hiddenCouche.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "hiddenCouche.h"
void HiddenCouche::activate(const Couche &prevCouche){
unsigned int prevSize = prevCouche.getNumber();
unsigned int thisSize = getNumber();
double sum;
for(unsigned int j=0; j < thisSize ; ++j){
sum = 0.0;
for(unsigned int i=0; i < prevSize ; ++i){
sum += prevCouche[i].getWeight() * prevCouche.getSynapse(i,j).getWeight();
}
(*this)[j] = util.sigmoid(sum);
}
}