|
ae2f_docs
|
#include <assert.h>#include <stdlib.h>Go to the source code of this file.
Macros | |
| #define | __ae2f_MACRO_GENERATED 1 |
| #define | __ae2f_MACRO_GENERATED 1 |
| #define | __ae2f_MACRO_GENERATED 1 |
| #define | ae2f_Ann_Mlp_c |
| #define | __ae2f_AnnMlpDel_C(a) |
| #define | __ae2f_AnnMlpMk_C(reterr, retmk, depth, szvector, szswap_opt, act, actderiv, lossderiv, deltastream, outcache, weight, bias, learningrate, learningrate_bias, offset, extra) |
| #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. | |
| #define | __ae2f_AnnMlpSz_imp(ret_sz, outc, weightc, depth, szswap, act, actderiv, deltastream, outcache, weight, bias) |
| #define | __ae2f_AnnMlpInitWithOutSz_imp(v_mlp, v_init, depth, outsz, weightsz, szvector, szswap_opt, act, actderiv, lossderiv, deltastream, outcache, weight, bias, learningrate, learningrate_bias) |
| #define | __ae2f_AnnMlpInit_imp(v_mlp, v_init, depth, szvector, szswap_opt, act, actderiv, lossderiv, deltastream, outcache, weight, bias, learningrate, learningrate_bias) |
| #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 | |
| #define | __ae2f_AnnMlpPredictPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, out) |
| #define | __ae2f_AnnMlpPredictStream_imp(v_predict, mlp, inp, out, sz, weight, bias, outcache, act_opt) |
| #define | __ae2f_AnnMlpPredictStream_C(reterr, mlp, inp, out) |
| #define | __ae2f_AnnMlpPredict_imp(v_predict, mlp, inp, out, sz, weight, bias, outcache, act_opt) |
| #define | __ae2f_AnnMlpPredict_C(reterr, mlp, inp, delta) |
| #define | __ae2f_AnnMlpHidDeltaSingle_imp(v_single, slp, weight, delta, iidx) |
| #define | __ae2f_AnnMlpBwd_imp(v_tmp, v_send, slp_then, retdelta_then, deltaseed, actderiv_then, inp) |
| delta to delta | |
| #define | __ae2f_AnnMlpFollowStream_imp(v_follow, mlp, inp, delta, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, actderiv) |
| #define | __ae2f_AnnMlpFollow_imp(v_follow, mlp, inp, delta, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, actderiv) |
| #define | __ae2f_AnnMlpFollowPrimal_imp(OPER_NEG, OPER_NONE, v_follow, mlp, inp, delta, lenv, outstream, deltacache, weight, bias, learningrate, learningrate_bias, actderiv) |
| #define | __ae2f_AnnMlpFollowPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, delta) |
| #define | __ae2f_AnnMlpFollow_C(reterr, mlp, inp, delta) |
| #define | __ae2f_AnnMlpFollowStream_C(reterr, mlp, inp, delta) |
| #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) |
| #define | __ae2f_AnnMlpTrainPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, out, out_desired) |
| #define | __ae2f_AnnMlpTrainAutoPrimal(OPER_NEG, OPER_NONE, reterr, mlp, inp, out_desired) |
| #define | __ae2f_AnnMlpTrain_C(reterr, mlp, inp, out, out_desired) |
| #define | __ae2f_AnnMlpTrainStream_C(reterr, mlp, inp, out, out_desired) |
| #define | __ae2f_AnnMlpTrain_imp(v_train, mlp, inp, out, goal, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, act, actderiv, lossderiv) |
| #define | __ae2f_AnnMlpTrainStream_imp(v_train, mlp, inp, out, goal, lenv, outstream, deltacache, weight, bias, lr_w, lr_b, act, actderiv, lossderiv) |
| #define | __ae2f_AnnMlpTrainAuto_C(reterr, mlp, inp, out_desired) |
| #define | __ae2f_AnnMlpTrainAutoStream_C(reterr, mlp, inp, out_desired) |
| #define | __ae2f_MACRO_GENERATED 0 |
| #define __ae2f_AnnMlpBwd_imp | ( | v_tmp, | |
| v_send, | |||
| slp_then, | |||
| retdelta_then, | |||
| deltaseed, | |||
| actderiv_then, | |||
| inp ) |
delta to delta
tparam param
Definition at line 588 of file Mlp.auto.h.
| #define __ae2f_AnnMlpDel_C | ( | a | ) |
Definition at line 38 of file Mlp.auto.h.
| #define __ae2f_AnnMlpFollow_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| delta ) |
Definition at line 816 of file Mlp.auto.h.
| #define __ae2f_AnnMlpFollow_imp | ( | v_follow, | |
| mlp, | |||
| inp, | |||
| delta, | |||
| lenv, | |||
| outstream, | |||
| deltacache, | |||
| weight, | |||
| bias, | |||
| lr_w, | |||
| lr_b, | |||
| actderiv ) |
Definition at line 612 of file Mlp.auto.h.
| #define __ae2f_AnnMlpFollowPrimal | ( | OPER_NEG, | |
| OPER_NONE, | |||
| reterr, | |||
| mlp, | |||
| inp, | |||
| delta ) |
tparam param
Definition at line 785 of file Mlp.auto.h.
| #define __ae2f_AnnMlpFollowPrimal_imp | ( | OPER_NEG, | |
| OPER_NONE, | |||
| v_follow, | |||
| mlp, | |||
| inp, | |||
| delta, | |||
| lenv, | |||
| outstream, | |||
| deltacache, | |||
| weight, | |||
| bias, | |||
| learningrate, | |||
| learningrate_bias, | |||
| actderiv ) |
tparam param
Definition at line 615 of file Mlp.auto.h.
| #define __ae2f_AnnMlpFollowStream_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| delta ) |
Definition at line 819 of file Mlp.auto.h.
| #define __ae2f_AnnMlpFollowStream_imp | ( | v_follow, | |
| mlp, | |||
| inp, | |||
| delta, | |||
| lenv, | |||
| outstream, | |||
| deltacache, | |||
| weight, | |||
| bias, | |||
| lr_w, | |||
| lr_b, | |||
| actderiv ) |
Definition at line 608 of file Mlp.auto.h.
| #define __ae2f_AnnMlpHidDeltaSingle_imp | ( | v_single, | |
| slp, | |||
| weight, | |||
| delta, | |||
| iidx ) |
tparam param
Definition at line 566 of file Mlp.auto.h.
| #define __ae2f_AnnMlpInit_imp | ( | v_mlp, | |
| v_init, | |||
| depth, | |||
| szvector, | |||
| szswap_opt, | |||
| act, | |||
| actderiv, | |||
| lossderiv, | |||
| deltastream, | |||
| outcache, | |||
| weight, | |||
| bias, | |||
| learningrate, | |||
| learningrate_bias ) |
tparam param
Definition at line 352 of file Mlp.auto.h.
| #define __ae2f_AnnMlpInitWithOutSz_imp | ( | v_mlp, | |
| v_init, | |||
| depth, | |||
| outsz, | |||
| weightsz, | |||
| szvector, | |||
| szswap_opt, | |||
| act, | |||
| actderiv, | |||
| lossderiv, | |||
| deltastream, | |||
| outcache, | |||
| weight, | |||
| bias, | |||
| learningrate, | |||
| learningrate_bias ) |
tparam param
Definition at line 303 of file Mlp.auto.h.
| #define __ae2f_AnnMlpMk_C | ( | reterr, | |
| retmk, | |||
| depth, | |||
| szvector, | |||
| szswap_opt, | |||
| act, | |||
| actderiv, | |||
| lossderiv, | |||
| deltastream, | |||
| outcache, | |||
| weight, | |||
| bias, | |||
| learningrate, | |||
| learningrate_bias, | |||
| offset, | |||
| extra ) |
tparam param
Definition at line 40 of file Mlp.auto.h.
| #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.
If some parameter has <prop>, it means it's element(or value) will be handled by mlp in future.
> Which means it must be valid at least longer than a class newly allocated.
> Unless a parameter has <prop> with <init>, memory of the given parameter will not be initialised.
<reg> means it has state(which is mutable), and its memory does not require to be allocated linearly.
<opt> means its value could be '0', '\0', 0, 0x0, NULL, or nullptr.
<prm> means it could be primitive value, such as non-variable.
| [in,out] | reg_mk | <reg> Type: ae2f_reg ae2f_AnnMlpMk_t& Brief: A temporary buffer for this function. |
| prm_depth | <prm> Type: const size_t Brief: Depth for this machine willing to allocate. | |
| [in] | pprm_szvector | <ptr> <const> Type: const size_t[prm_depth] Brief: A shape of the model. |
| [out] | propptr_szswap_opt | <prop> <ptr> <opt> <init> Type: size_t[prm_depth]& Brief: Optional valid buffer for Mlp to store the value of pprm_szvector. |
| lppfn_act_opt | <prop> <ptr> <fn> <opt> Type: ae2f_AnnActFFN_t[prm_depth]& Brief: Optional valid buffer for activation function for each layer. | |
| lppfn_actderiv_opt | <prop> <ptr> <fn> <opt> Type: ae2f_AnnActFFN_t[prm_depth]& Brief: Optional valid buffer for activation derivative for each layer. | |
| pfn_lossderiv | <fn> <ptr> <prm> Type: ae2f_AnnLossFFN_t Brief: Derivative of loss function for mlp model. | |
| propptr_deltastream_opt | <prop> <ptr> Type: ae2f_float_t[MAX(pprm_szvector) * ((prm_depth) - 1)]& Brief: Optional delta stream buffer. | |
| propptr_outcache_opt | <prop> <ptr> Type: ae2f_float_t[MAX(pprm_szvector) * ((prm_depth) - 1)]& Brief: Optional output stream buffer. | |
| propptr_weight_opt | <prop> <ptr> Type: ae2f_float_t[MAXWEIGHT(pprm_szvector) * ((prm_depth) - 1)] Brief: Optional weight buffer. Details: To compute MAXWEIGHT, you could find a max value of multiplications of each neighbour. | |
| propptr_bias_opt | <prop> <ptr> Type: ae2f_float_t[MAX(pprm_szvector) * ((prm_depth) - 1)]& Brief: Optional bias buffer. | |
| prm_learningrate | <prm> Type: const ae2f_float_t Brief: learning rate for weights. | |
| prm_learningrate_bias | <prm> Type: const ae2f_float_t Brief: learning rate for bias. | |
| prm_offset_opt | <prm> <opt> Type: const size_t Brief: Desired gap between structure itself and additional buffers as bytes. | |
| prm_extra_opt | <prm> <opt> Type: const size_t Brief: Desired extra buffer size as bytes. |
tparam param
Definition at line 163 of file Mlp.auto.h.
| #define __ae2f_AnnMlpPredict_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| delta ) |
Definition at line 563 of file Mlp.auto.h.
| #define __ae2f_AnnMlpPredict_imp | ( | v_predict, | |
| mlp, | |||
| inp, | |||
| out, | |||
| sz, | |||
| weight, | |||
| bias, | |||
| outcache, | |||
| act_opt ) |
Definition at line 560 of file Mlp.auto.h.
| #define __ae2f_AnnMlpPredictPrimal | ( | OPER_NEG, | |
| OPER_NONE, | |||
| reterr, | |||
| mlp, | |||
| inp, | |||
| out ) |
tparam param
Definition at line 524 of file Mlp.auto.h.
| #define __ae2f_AnnMlpPredictPrimal_imp | ( | OPER_NEG, | |
| OPER_NONE, | |||
| v_predict, | |||
| mlp, | |||
| inp, | |||
| out, | |||
| sz, | |||
| weight, | |||
| bias, | |||
| outcache, | |||
| act_opt ) |
| #define __ae2f_AnnMlpPredictStream_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| out ) |
Definition at line 557 of file Mlp.auto.h.
| #define __ae2f_AnnMlpPredictStream_imp | ( | v_predict, | |
| mlp, | |||
| inp, | |||
| out, | |||
| sz, | |||
| weight, | |||
| bias, | |||
| outcache, | |||
| act_opt ) |
Definition at line 554 of file Mlp.auto.h.
| #define __ae2f_AnnMlpSz_imp | ( | ret_sz, | |
| outc, | |||
| weightc, | |||
| depth, | |||
| szswap, | |||
| act, | |||
| actderiv, | |||
| deltastream, | |||
| outcache, | |||
| weight, | |||
| bias ) |
tparam param
Definition at line 272 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrain_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| out, | |||
| out_desired ) |
Definition at line 947 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrain_imp | ( | v_train, | |
| mlp, | |||
| inp, | |||
| out, | |||
| goal, | |||
| lenv, | |||
| outstream, | |||
| deltacache, | |||
| weight, | |||
| bias, | |||
| lr_w, | |||
| lr_b, | |||
| act, | |||
| actderiv, | |||
| lossderiv ) |
Definition at line 953 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrainAuto_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| out_desired ) |
Definition at line 961 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrainAutoPrimal | ( | OPER_NEG, | |
| OPER_NONE, | |||
| reterr, | |||
| mlp, | |||
| inp, | |||
| out_desired ) |
tparam param
Definition at line 915 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrainAutoStream_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| out_desired ) |
Definition at line 965 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrainPrimal | ( | OPER_NEG, | |
| OPER_NONE, | |||
| reterr, | |||
| mlp, | |||
| inp, | |||
| out, | |||
| out_desired ) |
tparam param
Definition at line 884 of file Mlp.auto.h.
| #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 ) |
tparam param
Definition at line 822 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrainStream_C | ( | reterr, | |
| mlp, | |||
| inp, | |||
| out, | |||
| out_desired ) |
Definition at line 950 of file Mlp.auto.h.
| #define __ae2f_AnnMlpTrainStream_imp | ( | v_train, | |
| mlp, | |||
| inp, | |||
| out, | |||
| goal, | |||
| lenv, | |||
| outstream, | |||
| deltacache, | |||
| weight, | |||
| bias, | |||
| lr_w, | |||
| lr_b, | |||
| act, | |||
| actderiv, | |||
| lossderiv ) |
Definition at line 956 of file Mlp.auto.h.
| #define __ae2f_MACRO_GENERATED 1 |
Definition at line 2 of file Mlp.auto.h.
| #define __ae2f_MACRO_GENERATED 1 |
Definition at line 2 of file Mlp.auto.h.
| #define __ae2f_MACRO_GENERATED 1 |
Definition at line 2 of file Mlp.auto.h.
| #define __ae2f_MACRO_GENERATED 0 |
Definition at line 2 of file Mlp.auto.h.
| #define ae2f_Ann_Mlp_c |
Definition at line 36 of file Mlp.auto.h.