Earlier quoted context omitted.
This does nor preclude the use of threads or SIMD. Essentially this library is a demo toy that will need a lot to work to make useful in real conditions.
> Essentially this library is a demo toy It's 200 lines of C, what were you expecting?
Tinn: A tiny neural network library written in C99
21–30 of 62 posts
Re: Tinn: A tiny neural network library written in C99
#22Just curious, is there a reason for passing around the Tinn struct by-value? Will it get optimized?
Re: Tinn: A tiny neural network library written in C99
#23Single core? No AVX? What's the point of writing it in C?
Checking the vectorization report of icc 2018 for fprop() shows that the loops got inlined, unrolled and vectorized (with AVX512 and AVX2 instructions using XMM/YMM registers). I doubt that doing it by hand would be faster, but it would make the code a lot more complex.
You have a point on the parallelization part though, it can be cleanly parallelized with a few OpenMP Pragmas.
Re: Tinn: A tiny neural network library written in C99
#24Just curious, is there a reason for passing around the Tinn struct by-value? Will it get optimized?
Passing small structs by value isn't as expensive as it once was, modern ABIs pass the initial fields in registers. However, this struct does have ten pointer/integer fields, and I'm not aware of a mainstream ABI that allows that many. x86-64 allows up to six on Linux, IIRC. A quick check of the AArch64 ABI says it takes up to eight. So yeah, there will be stack traffic involved if these function calls are not inlined.
Re: Tinn: A tiny neural network library written in C99
#25Re: Tinn: A tiny neural network library written in C99
#26Earlier quoted context omitted.
> Essentially this library is a demo toy It's 200 lines of C, what were you expecting?
Generally when I see links to github projects on HN I expect something useful or extraordinary and this looks like my Neural Networks 101 assignment, only far more polished. But people seem to like it(over 400 stars right now) so maybe I am missing something.
Re: Tinn: A tiny neural network library written in C99
#27Earlier quoted context omitted.
> Essentially this library is a demo toy It's 200 lines of C, what were you expecting?
Generally when I see links to github projects on HN I expect something useful or extraordinary and this looks like my Neural Networks 101 assignment, only far more polished. But people seem to like it(over 400 stars right now) so maybe I am missing something.
Let people enjoy things.
Re: Tinn: A tiny neural network library written in C99
#28Earlier quoted context omitted.
Generally when I see links to github projects on HN I expect something useful or extraordinary and this looks like my Neural Networks 101 assignment, only far more polished. But people seem to like it(over 400 stars right now) so maybe I am missing something.
So... if its usefulness is equal to something you've made, AND it's available to the public, AND it's more polished... why exactly are you shitposting about it? Let people enjoy things.
Re: Tinn: A tiny neural network library written in C99
#29Just curious, is there a reason for passing around the Tinn struct by-value? Will it get optimized?
Re: Tinn: A tiny neural network library written in C99
#30Earlier quoted context omitted.
So... if its usefulness is equal to something you've made, AND it's available to the public, AND it's more polished... why exactly are you shitposting about it? Let people enjoy things.
I just pointed out that this is a very basic code. It's definitely not something I would use in any real life scenario(see other posts itt). And if you want to learn about NN you'd be better off googling something like 'backpropagation example' as this project does is virtually not documented. I personally don't find it useful and it takes up the space that can be filled with more interesting content. How is that 'sh…