Commit 5b5a711b authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Do not use '_' as it is reserved for subscripts

parent f017117e
Pipeline #188035 passed with stages
in 10 minutes and 28 seconds
......@@ -514,31 +514,31 @@ perceptron. It is allocated by =julien_alloc=, and discarded with
pseudo-random number generator; maybe you will want to initialize it
yourself with =julien_set_data=.
** =struct julien *= /=julien_alloc=/ (=size_t= /dim\_input/, =size_t= /dim\_output/, =size_t= /n\_hidden/, =const size_t *restrict= /dim\_hidden/)
Allocate and initialize a new perceptron with /dim\_input/ inputs,
/dim\_output/ outputs, and /n\_hidden/ layers (with respective
dimensions /dim\_hidden/). The returned object must be freed with
** =struct julien *= /=julien_alloc=/ (=size_t= /dim input/, =size_t= /dim output/, =size_t= /n hidden/, =const size_t *restrict= /dim hidden/)
Allocate and initialize a new perceptron with /dim input/ inputs,
/dim output/ outputs, and /n hidden/ layers (with respective
dimensions /dim hidden/). The returned object must be freed with
=julien_free=.
** =void= /=julien_free=/ (=struct julien *= /julien/)
Free the resources used by /julien/, as allocated by =julien_alloc=.
** =const double *= /=julien_data=/ (=const struct julien *= /julien/, =size_t *= /n\_parameters/)
** =const double *= /=julien_data=/ (=const struct julien *= /julien/, =size_t *= /n parameters/)
Return a pointer to the internal data of /julien/, and set
/n\_parameters/ (if it is not =NULL=) to the size of the return value.
/n parameters/ (if it is not =NULL=) to the size of the return value.
** =void= /=julien_set_data=/ (=struct julien *= /julien/, =size_t= /start/, =size_t= /n/, =const double *restrict= /parameters/)
Skip the /start/ first parameters in /julien/, then initialize the
following /n/ /parameters/.
** =double= /=julien_learn=/ (=struct julien *= /julien/, =size_t= /dim\_input/, =const double *restrict= /input/, =size_t= /dim\_output/, =const double *restrict= /output/, =double= /learning\_rate/)
** =double= /=julien_learn=/ (=struct julien *= /julien/, =size_t= /dim input/, =const double *restrict= /input/, =size_t= /dim output/, =const double *restrict= /output/, =double= /learning rate/)
Teach /julien/ to learn the /output/ array (of dimension
/dim\_output/) when seing the /input/ array (of dimension
/dim\_input/). Learning is more efficient as /learning\_rate/ grows,
/dim output/) when seing the /input/ array (of dimension
/dim input/). Learning is more efficient as /learning rate/ grows,
but if it is too high then there is a risk /julien/ would forget too
fast to learn anything.
Both /dim\_input/ and /dim\_output/ need not be of the expected
Both /dim input/ and /dim output/ need not be of the expected
dimension (as given at allocation time to =julien_alloc=). If the
dimensions are too high, then only the first elements are considered.
If the arrays are too small, then the remaining elements will be set
......@@ -547,8 +547,8 @@ to 0.
Return the mean update to the internal weights. If this value is
close to 0, then /julien/ does not learn anymore and you can stop it.
** =size_t= /=julien_predict=/ (=struct julien *= /julien/, =size_t= /dim\_input/, =const double *restrict= /input/, =size_t= /max\_output/, =size_t= /start\_output/, =double *restrict= /output/)
** =size_t= /=julien_predict=/ (=struct julien *= /julien/, =size_t= /dim input/, =const double *restrict= /input/, =size_t= /max output/, =size_t= /start output/, =double *restrict= /output/)
Use /julien/ to predict the /output/ given /input/. More
specifically, discard the first /start\_output/ elements, then store
up to the following /max\_output/ elements into /output/, and return
specifically, discard the first /start output/ elements, then store
up to the following /max output/ elements into /output/, and return
the total number of elements.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment