UlisseMini / light

Autodiff in pure lua. Think pytorch but a lot slower
6 stars 0 forks source link

Big push to tensor autograd #3

Closed UlisseMini closed 3 years ago

UlisseMini commented 3 years ago
UlisseMini commented 3 years ago

So I originally wanted to just do autograd through matmul, and that's relatively easy. but now I'm focused on refactoring and improving code quality. Maybe I should merge this with master, I do have the tests passing after all

UlisseMini commented 3 years ago

Turns out the whole premise of using storage instead of nested arrays was stupid, yay!

You can totally backprop through ops like transpose tinygrad does it, the implementation complexity of storage isn't worth it, combined with the bugs that will naturally come up from all the pointers and mutation if I add view.

Trying to copy pytorch is a bad idea, (a) its written in c++ and (b) it aims to be production ready, not have a simple implementation

UlisseMini commented 3 years ago

Why am I doing everything on a branch again? lol