We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d80b20 commit ae8de33Copy full SHA for ae8de33
2 files changed
try1 (OOP Approach)/cpp/include/NeuralNet/classes.h
@@ -19,6 +19,7 @@ class Layer {
19
20
public:
21
Neuron **neurons;
22
+ float *activations;
23
Layer(int size, int prevLayerSize);
24
~Layer();
25
void forward_pass(float *inputs, int input_size);
try1 (OOP Approach)/cpp/src/classes.cpp
@@ -48,6 +48,7 @@ Neuron::~Neuron() {
48
Layer::Layer(int size, int prevLayerSize) {
49
this->size = size;
50
this->neurons = new Neuron *[size];
51
+ this->activations = new float[size]();
52
53
for (int i = 0; i < size; i++) {
54
this->neurons[i] = new Neuron(prevLayerSize);
0 commit comments