Refactoring for use in https://github.com/mingodad/squilu #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my latest refactoring of neural-redis, I did it to learn/understand it and to use with https://github.com/mingodad/squilu
The code for AVX and AVX512 still use unaligned memory because on some machine it doesn't work with aligned memory.
The random initialisation used in tests/nn-benchmark.c wasn't working properly so I changed the it to have a better entropy.
Added a function "Ann2Js" to generate a javascript function emulating the trained network, also fixed/changed the generated TCL in "An2Tcl" because it was broken.
I'm still do not like/understand the way weight/gradient/pgradient/delta are indexed but I could not find a better working way till now.
This is here just in case it can be util to other people too.
Cheers !