Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, but this approach generalizes quite well. Especially in ML you have have a lot of matrices, many of them of known size (e.g. convolution kernels).

Also, while it looks like the matrix sizes have to be known at compile time, this is not the case. You are still free to use the same matrix types with dynamic sizes (or even mix them, useful for said convolutions).

In Haskell there that is achieved by using a "KnownNat", basically you elevate an integer from the value into the type level during run-time.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: