Results 26 comments of Attractive Chaos

`kann_class_error()` doesn't work with binary cross-entropy `KANN_C_CEB`. With this cost, there can be multiple `1`s, but `kann_class_error()` assumes there is only one `1`.

I have no experience with ARM CPUs. Is M4F little endian or big endian? If it is big endian, model generated on x86 won't work, though the issue should be...

See the comment at [line 51](https://github.com/attractivechaos/klib/blob/master/khash.h#L51), in particular the quote from [this post](http://research.cs.vt.edu/AVresearch/hashing/quadratic.php): > if the hash table size is a power of two and the probe function is p(K,...

Oh, wait... You are right and I was wrong. It takes more than `h->n_buckets` in the worst case. The better way is `if(step == h->n_buckets)`.

I was thinking that, too. If the program is correctly implemented elsewhere, we should not need that `if(i==last)` line. On my test, with or without this line makes little difference...

You can have something like this (you would like to use a better hash function as pointers are not random): ``` c #if UINTPTR_MAX == UINT64_MAX static inline uint32_t hash_intptr(uintptr_t...

For now, I do not have plan to properly package klib, partly due to the way it is developed and partly due to the fact that each component of klib...

See also: http://attractivechaos.github.io/klib/#Khash%3A%20generic%20hash%20table

@ArcaneEngineer check out the 2nd example. It is more general as it shows how to work with strings allocated on heap (i.e. with malloc() and new). The example above only...

@mathog You need to use `strdup()` to duplicate the key and free the memory when you delete the key or when you destroy the entire hash table. See example 3...