MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / forward_propagate

Method forward_propagate

examples/machine_learning/deep_belief_net.cpp:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 }
121
122 vector<array> forward_propagate(const array &input) {
123 // Get activations at each layer
124 vector<array> signal(num_total);
125 signal[0] = input;
126
127 for (int i = 0; i < num_total - 1; i++) {
128 array in = add_bias(signal[i]);
129 array out = matmul(in, weights[i]);
130 signal[i + 1] = sigmoid(out);
131 }
132
133 return signal;
134 }
135
136 void back_propagate(const vector<array> signal, const array &target,
137 const double &alpha) {

Callers

nothing calls this directly

Calls 2

matmulFunction · 0.50
sigmoidFunction · 0.50

Tested by

no test coverage detected