ae2f_docs
Mlp.h
Go to the documentation of this file.
1/** @file Mlp.h */
2
3#ifndef ae2f_NEED_CLASS
4#define ae2f_NEED_CLASS 1
5#endif
6
7#ifndef ae2f_Ann_Mlp_h
8#define ae2f_Ann_Mlp_h
9
10/** TODO: Separate header and macros */
11#include "./Mlp.core.h"
12
14#include <ae2f/Ann/Act.h>
15#endif
16
17#include "./Slp.h"
18#include <ae2f/Pack/Beg.h>
19#include <assert.h>
20
21/**
22 * @brief
23 * # Multi Layered Perceptron
24 *
25 * This is the main structure for the MLP.
26 */
27ae2f_structdef(struct, ae2f_AnnMlp)
29{
30 /**
31 * @brief
32 * Depth of the network, including input and output layers.
33 */
34 size_t m_depth;
35
36 /**
37 * @brief
38 * Possible greatest output size.
39 */
40 size_t m_outc;
41
42 /** Possible greatest weight page size */
43 size_t m_weightc;
44
45 /**
46 * @brief
47 * Vector of layer sizes.
48 */
49 ae2f_LP(m_depth) const size_t* ae2f_restrict m_sz;
50
51 /**
52 * @brief
53 * Weights of the network.
54 */
55 ae2f_LP(m_outc * m_outc * (m_depth - 1)) ae2f_float_t* ae2f_restrict m_weight;
56 /**
57 * @brief
58 * Biases of the network.
59 */
60 ae2f_LP(m_outc * (m_depth - 1)) ae2f_float_t* ae2f_restrict m_bias;
61 /**
62 * @brief
63 * Stream for delta values during backpropagation.
64 */
65 ae2f_LP(m_outc * (m_depth - 1)) ae2f_float_t* ae2f_restrict m_deltastream;
66 /**
67 * @brief
68 * Cache for layer outputs.
69 */
70 ae2f_LP(m_outc * (m_depth - 1)) ae2f_float_t* ae2f_restrict m_outcache;
71
72 /**
73 * @brief
74 * Activation functions for each layer.
75 */
76 ae2f_LP(m_depth - 1) ae2f_AnnActFFN_t** ae2f_restrict m_act;
77 /**
78 * @brief
79 * Derivatives of activation functions for each layer.
80 */
81 ae2f_LP(m_depth - 1) ae2f_AnnActFFN_t** ae2f_restrict m_actderiv;
82 /**
83 * @brief
84 * Derivative of the loss function.
85 */
86 ae2f_AnnLossFFN_t* m_lossderiv;
87
88 /**
89 * @brief
90 * Learning rate for weights.
91 */
92 ae2f_float_t m_learningrate;
93 /**
94 * @brief
95 * Learning rate for biases.
96 */
97 ae2f_float_t m_learningrate_bias;
98
99#if ae2f_WhenCXX(!)0
100#undef ae2f_TMP
101#define ae2f_TMP
102
103 inline void ae2f_TMP Predict(
104 ae2f_opt ae2f_err_t* ae2f_restrict reterr
105 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
106 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
107 ) const ae2f_noexcept;
108
109 inline void ae2f_TMP PredictStream(
110 ae2f_opt ae2f_err_t* ae2f_restrict reterr
111 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
112 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
113 ) const ae2f_noexcept;
114
115 inline void ae2f_TMP Follow(
116 ae2f_opt ae2f_err_t* const reterr
117 , const ae2f_float_t* const inp ae2f_LP(mlp::m_sz[0])
118 , const ae2f_float_t* const delta ae2f_LP(mlp::m_sz[fin])
119 ) ae2f_noexcept;
120
121 inline void ae2f_TMP FollowStream(
122 ae2f_opt ae2f_err_t* const reterr
123 , const ae2f_float_t* const inp ae2f_LP(mlp::m_sz[0])
124 , const ae2f_float_t* const delta ae2f_LP(mlp::m_sz[fin])
125 ) ae2f_noexcept;
126
127 inline void ae2f_TMP Train(
128 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
129 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
130 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
131 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
132 ) ae2f_noexcept;
133
134 inline void ae2f_TMP TrainStream(
135 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
136 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
137 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
138 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
139 ) ae2f_noexcept;
140
141 inline void ae2f_TMP TrainAuto(
142 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
143 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
144 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
145 ) ae2f_noexcept;
146
147 inline void ae2f_TMP TrainAutoStream(
148 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
149 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
150 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
151 ) ae2f_noexcept;
152
153#endif
154}
155#endif
156;
157
158#include <ae2f/Pack/End.h>
159
160
161#if ae2f_MAC_BUILD && 0
162
163ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpMk(
164 ae2f_opt ae2f_err_t* ae2f_restrict const reterr
165 , ae2f_AnnMlp* ae2f_restrict* ae2f_restrict const retmk ae2f_FREE(ae2f_AnnMlpDel)
166
167 , const size_t depth
168 , const size_t* ae2f_restrict const szvector ae2f_LP(depth)
169 , ae2f_opt size_t* ae2f_restrict const szswap_opt ae2f_LP(depth)
170
171 , ae2f_opt ae2f_AnnActFFN_t** ae2f_restrict const act ae2f_LP(depth - 1)
172 , ae2f_opt ae2f_AnnActFFN_t** ae2f_restrict const actderiv ae2f_LP(depth - 1)
173 , ae2f_AnnLoss_t* const lossderiv
174
175 , ae2f_opt ae2f_float_t* ae2f_restrict const deltastream ae2f_LP(max(szvector) * (depth - 1))
176 , ae2f_opt ae2f_float_t* ae2f_restrict const outcache ae2f_LP(max(szvector) * (depth - 1))
177 , ae2f_opt ae2f_float_t* ae2f_restrict const weight ae2f_LP(pow(max(szvector), 2) * (depth - 1))
178 , ae2f_opt ae2f_float_t* ae2f_restrict const bias ae2f_LP(max(szvector) * (depth - 1))
179
180 , ae2f_float_t const learningrate
181 , ae2f_float_t const learningrate_bias
182
183 , ae2f_opt const size_t offset
184, ae2f_opt const size_t extra
185) ae2f_noexcept;
186
187ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpDel(
188 ae2f_AnnMlp* ae2f_restrict const block
189 ) ae2f_noexcept;
190
191/**
192 * @brief
193 * Predict the output from mlp.
194 * */
195ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpPredict(
196 ae2f_opt ae2f_err_t* ae2f_restrict reterr
197 , const ae2f_AnnMlp* ae2f_restrict const mlp
198 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
199 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
200 ) ae2f_noexcept;
201
202 /**
203 * @brief
204 * Predict the output from mlp.
205 *
206 * @details
207 * Every output calculated for each layer will be stored on mlp->m_outcache
208 * */
209ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpPredictStream(
210 ae2f_err_t* ae2f_restrict reterr
211 , const ae2f_AnnMlp* ae2f_restrict const mlp
212 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
213 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
214 ) ae2f_noexcept;
215
216 /**
217 * @brief
218 * Adjusts the weights and biases with given delta for last layer.
219 * */
220ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpFollow(
221 ae2f_opt ae2f_err_t* ae2f_restrict const reterr
222 , const ae2f_AnnMlp* ae2f_restrict mlp
223 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
224 , const ae2f_float_t* ae2f_restrict const delta ae2f_LP(mlp::m_sz[fin])
225 ) ae2f_noexcept;
226
227 /**
228 * @brief
229 * Adjusts the weights and biases with given delta for last layer.
230 * */
231ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpFollowStream(
232 ae2f_opt ae2f_err_t* ae2f_restrict const reterr
233 , const ae2f_AnnMlp* ae2f_restrict mlp
234 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
235 , const ae2f_float_t* ae2f_restrict const delta ae2f_LP(mlp::m_sz[fin])
236 ) ae2f_noexcept;
237
238 /**
239 * @brief
240 * Adjusts the weights and biases with given input and output_desired
241 * */
242ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpTrain(
243 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
244 , ae2f_AnnMlp* ae2f_restrict const mlp
245 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
246 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
247 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
248 ) ae2f_noexcept;
249
250 /**
251 * @brief
252 * Adjusts the weights and biases with given input and output_desired
253 * Previous output will be
254 * */
255ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpTrainStream(
256 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
257 , ae2f_AnnMlp* ae2f_restrict const mlp
258 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
259 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
260 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
261 ) ae2f_noexcept;
262
263 /**
264 * @brief
265 * Adjusts the weights and biases with given input and output_desired
266 * */
267ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpTrainAuto(
268 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
269 , ae2f_AnnMlp* ae2f_restrict const mlp
270 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
271 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
272 ) ae2f_noexcept;
273
274 /**
275 * @brief
276 * Adjusts the weights and biases with given input and output_desired
277 * Previous output will be
278 * */
279ae2f_extern ae2f_SHAREDCALL void ae2f_AnnMlpTrainAutoStream(
280 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
281 , ae2f_AnnMlp* ae2f_restrict const mlp
282 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
283 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
284 ) ae2f_noexcept;
285
286#else
287
288#define ae2f_AnnMlpMk __ae2f_AnnMlpMk_C
289#define ae2f_AnnMlpDel __ae2f_AnnMlpDel_C
290
291#define ae2f_AnnMlpPredict __ae2f_AnnMlpPredict_C
292#define ae2f_AnnMlpPredictStream __ae2f_AnnMlpPredictStream_C
293#define ae2f_AnnMlpFollow __ae2f_AnnMlpFollow_C
294#define ae2f_AnnMlpFollowStream __ae2f_AnnMlpFollowStream_C
295#define ae2f_AnnMlpTrain __ae2f_AnnMlpTrain_C
296#define ae2f_AnnMlpTrainStream __ae2f_AnnMlpTrainStream_C
297#define ae2f_AnnMlpTrainAuto __ae2f_AnnMlpTrainAuto_C
298#define ae2f_AnnMlpTrainAutoStream __ae2f_AnnMlpTrainAutoStream_C
299
300
301#endif
302
303#include "./Mlp.auto.h"
304
306
307 /**
308 * @FIXME
309 * It somehow compiles and I see redefining errors.
310 * */
311#undef ae2f_TMP
312#define ae2f_TMP ae2f_AnnMlp::
313inline void ae2f_TMP Predict(
314 ae2f_err_t* ae2f_restrict reterr
315 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
316 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
317 ) const ae2f_noexcept {
318 ae2f_AnnMlpPredict(reterr, this, inp, out);
319}
320
321inline void ae2f_TMP PredictStream(
322 ae2f_err_t* ae2f_restrict reterr
323 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
324 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
325 ) const ae2f_noexcept {
326 ae2f_AnnMlpPredictStream(reterr, this, inp, out);
327}
328
329inline void ae2f_TMP Follow(
330 ae2f_err_t* const reterr
331 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
332 , const ae2f_float_t* ae2f_restrict const delta ae2f_LP(mlp::m_sz[fin])
333 ) ae2f_noexcept {
334 ae2f_AnnMlpFollow(reterr, this, inp, delta);
335}
336
337inline void ae2f_TMP FollowStream(
338 ae2f_err_t* const reterr
339 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
340 , const ae2f_float_t* ae2f_restrict const delta ae2f_LP(mlp::m_sz[fin])
341 ) ae2f_noexcept {
342 ae2f_AnnMlpFollowStream(reterr, this, inp, delta);
343}
344
345inline void ae2f_TMP Train(
346 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
347 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
348 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
349 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
350 ) ae2f_noexcept {
351 ae2f_AnnMlpTrain(reterr, this, inp, out, out_desired);
352}
353
354inline void ae2f_TMP TrainStream(
355 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
356 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
357 , ae2f_float_t* ae2f_restrict const out ae2f_LP(mlp::m_sz[fin])
358 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
359 ) ae2f_noexcept {
360 ae2f_AnnMlpTrainStream(reterr, this, inp, out, out_desired);
361}
362
363inline void ae2f_TMP TrainAuto(
364 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
365 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
366 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
367 ) ae2f_noexcept {
368 ae2f_AnnMlpTrainAuto(reterr, this, inp, out_desired);
369}
370
371inline void ae2f_TMP TrainAutoStream(
372 ae2f_err_t* ae2f_restrict const ae2f_opt reterr
373 , const ae2f_float_t* ae2f_restrict const inp ae2f_LP(mlp::m_sz[0])
374 , const ae2f_float_t* ae2f_restrict const out_desired ae2f_LP(mlp::m_sz[fin])
375 ) ae2f_noexcept {
376 ae2f_AnnMlpTrainAutoStream(reterr, this, inp, out_desired);
377}
378
379
380#endif
381
382#define __ae2f_AnnMlpTrain_C(reterr, mlp, inp, out, out_desired)
383 __ae2f_AnnMlpTrainPrimal(&1 ? 0 : 1, &1, reterr, mlp, inp, out, out_desired)
384
385#define __ae2f_AnnMlpTrainStream_C(reterr, mlp, inp, out, out_desired)
386 __ae2f_AnnMlpTrainPrimal(&1 ? 0 : 1, ae2f_NONE, reterr, mlp, inp, out, out_desired)
387
388#define __ae2f_AnnMlpTrain_imp(v_train, mlp, inp, out, goal, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, act, actderiv, lossderiv)
389 __ae2f_AnnMlpTrainPrimal_imp(&1 ? 0 : 1, &1, v_train, mlp, inp, out, goal, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, act, actderiv, lossderiv)
390
391#define __ae2f_AnnMlpTrainStream_imp(v_train, mlp, inp, out, goal, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, act, actderiv, lossderiv)
392 __ae2f_AnnMlpTrainPrimal_imp(-1, ae2f_NONE, v_train, mlp, inp, out, goal, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, act, actderiv, lossderiv)
393
394
395/** @see __ae2f_AnnMlpTrainAutoPrimal */
396#define __ae2f_AnnMlpTrainAuto_C(reterr, mlp, inp, out_desired)
397 __ae2f_AnnMlpTrainAutoPrimal(&1 ? 0 : 1, &1, reterr, mlp, inp, out_desired)
398
399/** @see __ae2f_AnnMlpTrainAutoPrimal */
400#define __ae2f_AnnMlpTrainAutoStream_C(reterr, mlp, inp, out_desired)
401 __ae2f_AnnMlpTrainAutoPrimal(-1, ae2f_NONE, reterr, mlp, inp, out_desired)
402
403#endif
#define ae2f_AnnActDerivFFN_PASS(r, o, i, c)
Definition Act.h:28
#define ae2f_AnnActFFN_PASS(r, o, i, c)
Definition Act.h:27
#define ae2f_structdef(key, name)
Definition Cast.h:110
#define ae2f_reinterpret_cast(t, v)
Definition Cast.h:52
#define unless(...)
Invokes when condition is false.
Definition Cast.h:103
#define ae2f_extern
Suggests the existence of external variable or function, in naming of C. [non-mangling].
Definition Cast.h:88
#define ae2f_structdef_n(key, name,...)
Definition Cast.h:109
#define ae2f_reg
Register keyword.
Definition Reg.h:12
#define ae2f_WhenCXX(...)
Appears when the current language is C.
Definition Cxx.h:37
#define ae2f_NONE
Literally nothing.
Definition Cxx.h:16
#define ae2f_LP(...)
Definition Guide.h:23
#define ae2f_FREE(...)
Definition Guide.h:33
#define ae2f_opt
Definition Guide.h:26
#define ae2f_errGlob_ALLOC_FAILED
stdlib allocating functions (malloc, calloc, realloc) has been failed.
Definition errGlob.h:40
uint8_t ae2f_err_t
Informs that this number represents the error.
Definition errGlob.h:19
#define ae2f_errGlob_PTR_IS_NULL
Failed to refer the pointer either l-value inside the function.
Definition errGlob.h:32
#define ae2f_errGlob_IMP_NOT_FOUND
Failed to find the function on preprocessor which is callable for some reason No operation has beed d...
Definition errGlob.h:28
#define __ae2f_MACRO_GENERATED
Definition Conv.auto.h:2
#define ae2f_MAC_BUILD
Definition Util.h:5
#define ae2f_NEED_CLASS
Definition Mlp.cl.c:8
#define OPER_NONE
Definition Mlp.def.c:21
#define OPER_NEG
Definition Mlp.def.c:20
#define __ae2f_AnnMlpSz_imp(ret_sz, outc, weightc, depth, szswap, act, actderiv, deltastream, outcache, weight, bias)
Definition Mlp.auto.h:272
#define __ae2f_AnnMlpMk_C(reterr, retmk, depth, szvector, szswap_opt, act, actderiv, lossderiv, deltastream, outcache, weight, bias, learningrate, learningrate_bias, offset, extra)
Definition Mlp.auto.h:40
#define __ae2f_AnnMlpBwd_imp(v_tmp, v_send, slp_then, retdelta_then, deltaseed, actderiv_then, inp)
delta to delta
Definition Mlp.auto.h:588
#define __ae2f_AnnMlpHidDeltaSingle_imp(v_single, slp, weight, delta, iidx)
Definition Mlp.auto.h:566
#define __ae2f_AnnMlpPredictStream_imp(v_predict, mlp, inp, out, sz, weight, bias, outcache, act_opt)
Definition Mlp.auto.h:554
#define __ae2f_AnnMlpMk_imp(reg_mk, prm_depth, pprm_szvector, propptr_szswap_opt, lppfn_act_opt, lppfn_actderiv_opt, pfn_lossderiv, propptr_deltastream_opt, propptr_outcache_opt, propptr_weight_opt, propptr_bias_opt, prm_learningrate, prm_learningrate_bias, prm_offset_opt, prm_extra_opt)
Automatically allocates ae2f_AnnMlp and store its pointer at (reg_mk).m_mkbase.
Definition Mlp.auto.h:163
#define __ae2f_AnnMlpInitWithOutSz_imp(v_mlp, v_init, depth, outsz, weightsz, szvector, szswap_opt, act, actderiv, lossderiv, deltastream, outcache, weight, bias, learningrate, learningrate_bias)
Definition Mlp.auto.h:303
#define __ae2f_AnnMlpPredictStream_C(reterr, mlp, inp, out)
Definition Mlp.auto.h:557
#define __ae2f_AnnMlpPredict_C(reterr, mlp, inp, delta)
Definition Mlp.auto.h:563
#define __ae2f_AnnMlpTrainPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, out, out_desired)
Definition Mlp.auto.h:884
#define __ae2f_AnnMlpFollowPrimal_imp(OPER_NEG, OPER_NONE, v_follow, mlp, inp, delta, lenv, outstream, deltacache, weight, bias, learningrate, learningrate_bias, actderiv)
Definition Mlp.auto.h:615
#define __ae2f_AnnMlpPredictPrimal_imp(OPER_NEG, OPER_NONE, v_predict, mlp, inp, out, sz, weight, bias, outcache, act_opt)
layer must be more than 2
Definition Mlp.auto.h:397
#define __ae2f_AnnMlpTrainAuto_C(reterr, mlp, inp, out_desired)
Definition Mlp.auto.h:961
#define __ae2f_AnnMlpTrainAutoPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, out_desired)
Definition Mlp.auto.h:915
#define __ae2f_AnnMlpTrain_C(reterr, mlp, inp, out, out_desired)
Definition Mlp.auto.h:947
#define __ae2f_AnnMlpTrainAutoStream_C(reterr, mlp, inp, out_desired)
Definition Mlp.auto.h:965
#define __ae2f_AnnMlpDel_C(a)
Definition Mlp.auto.h:38
#define __ae2f_AnnMlpPredictPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, out)
Definition Mlp.auto.h:524
#define __ae2f_AnnMlpTrainStream_C(reterr, mlp, inp, out, out_desired)
Definition Mlp.auto.h:950
#define __ae2f_AnnMlpFollowPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, delta)
Definition Mlp.auto.h:785
#define __ae2f_AnnMlpTrainPrimal_imp(OPER_NEG, OPER_NONE, v_train, mlp, inp, out, out_desired, lenv, outstream, deltacache, weight, bias, learningrate, learningrate_bias, act, actderiv, lossderiv)
Definition Mlp.auto.h:822
#define __ae2f_AnnMlpFollowStream_C(reterr, mlp, inp, delta)
Definition Mlp.auto.h:819
#define __ae2f_AnnMlpFollow_C(reterr, mlp, inp, delta)
Definition Mlp.auto.h:816
#define ae2f_AnnMlpTrain
Definition Mlp.h:295
#define ae2f_AnnMlpTrainAutoStream
Definition Mlp.h:298
#define ae2f_AnnMlpFollow
Definition Mlp.h:293
#define ae2f_AnnMlpPredict
Definition Mlp.h:291
#define ae2f_AnnMlpTrainStream
Definition Mlp.h:296
#define ae2f_AnnMlpFollowStream
Definition Mlp.h:294
#define ae2f_AnnMlpPredictStream
Definition Mlp.h:292
#define ae2f_AnnMlpTrainAuto
Definition Mlp.h:297
#define __ae2f_AnnSlpFollow_imp(reg_follow, prm_slp, pprm_in, pprm_delta, ptr_weight, ptr_bias, prm_learningrate, prm_learningrate_bias)
Definition Slp.auto.h:435
#define __ae2f_AnnSlpInit_imp(...)
Definition Slp.auto.h:129
#define __ae2f_AnnSlpFit_C(...)
Definition Slp.auto.h:870
#define __ae2f_AnnSlpFollow_C(...)
Definition Slp.auto.h:524
#define __ae2f_AnnSlpFollowOne_imp(reg_follow, pprm_in, pprm_delta, ptr_weight, prm_learningrate, prm_learningrate_bias, prm_isz, prm_oidx, rret_bias)
Definition Slp.auto.h:410
#define __ae2f_AnnSlpMk_imp(...)
Definition Slp.auto.h:267
#define __ae2f_AnnSlpFetchDelta_imp(tmp_delta, prm_slp, pprm_out, pprm_out_desired, fn_actderiv, fn_lossderiv, pret_delta)
Definition Slp.auto.h:586
#define __ae2f_AnnSlpTrainVerbose_imp(ram_train, reg_train, prm_slp, pprm_inp, pret_out, ptr_out_cache, pprm_out_desired, ptr_weights, ptr_bias, ptr_cachedelta, fn_act, fn_actderiv, fn_lossderiv, prm_learningrate, prm_learningrate_bias)
Definition Slp.auto.h:874
#define __ae2f_AnnSlpPredict(err_opt, _this, prm_in, out, out_cache, weight, bias, act_opt)
Definition Slp.auto.h:311
#define __ae2f_AnnSlpFitVerbose_imp(ram_fit, reg_fit, prm_slp, pprm_inp, pprm_out, pprm_out_desired, ptr_weights, ptr_bias, ptr_cachedelta, fn_actderiv, fn_lossderiv, prm_learningrate, prm_learningrate_bias)
Definition Slp.auto.h:706
#define __ae2f_AnnSlpInit(...)
Definition Slp.auto.h:133
#define __ae2f_AnnSlpFit(reterr_opt, _this, prm_inp, prm_out, prm_out_desired, weights, bias, cachedelta, actderiv_opt, lossderiv, learningrate, learningrate_bias)
Definition Slp.auto.h:769
#define __ae2f_AnnSlpFetchDelta_C(...)
Definition Slp.auto.h:701
#define __ae2f_AnnSlpDel_C
Definition Slp.auto.h:20
#define __ae2f_AnnSlpTrain_C
Definition Slp.auto.h:984
#define __ae2f_AnnSlpInit_C
Definition Slp.auto.h:139
#define __ae2f_AnnSlpFetchDeltaVerbose_imp(ram_delta, reg_delta, prm_slp, pprm_out, pprm_out_desired, fn_actderiv, fn_lossderiv, pret_delta)
Definition Slp.auto.h:550
#define __ae2f_AnnSlpFollow(reterr_opt, _this, prm_in, delta, weight, bias, learningrate, learningrate_bias)
Definition Slp.auto.h:464
#define __ae2f_AnnSlpPredict_imp(reg_predict, prmreg_slp, pprm_in, ret, ptr_outcache, pprm_weight, pprm_bias, fn_act)
Definition Slp.auto.h:278
#define __ae2f_AnnSlpTrain(err, slp, inp, out_cache, out_desired, weights, bias, cachedelta, act, actderiv, lossderiv, learningrate, learningrate_bias)
Definition Slp.auto.h:989
#define __ae2f_AnnSlpInitInpSz_imp(...)
Definition Slp.auto.h:125
#define __ae2f_AnnSlpMk(...)
Definition Slp.auto.h:271
#define __ae2f_AnnSlpMk_C
Definition Slp.auto.h:275
#define __ae2f_AnnSlpPredict_C(...)
Definition Slp.auto.h:376
#define ae2f_AnnSlpMk
Definition Slp.h:263
#define ae2f_AnnSlpDel
Definition Slp.h:264
#define ae2f_AnnSlpTrain
Definition Slp.h:268
#define ae2f_AnnSlpPredict
Definition Slp.h:265
#define ae2f_AnnSlpFollow
Definition Slp.h:266
#define ae2f_AnnSlpFit
Definition Slp.h:267
#define ae2f_MAC(...)
Definition mac.h:28