7 ms·
Minitorch: Implement the Torch API from Scratch, from Cornell Tech
- darepublic 5y agoAmazing, I was looking to do something very similar for myself-- dig into pytorch library to see how everything was working.
- rg111 5y agoThere is also the book Deep Learning from Scratch.
- hex9893628af 5y agoAre there any resources that use languages other than python? I would prefer to work with code examples in a language that I might actually use.
- kbutler 5y agoIf you're doing machine learning, python is a very viable language to actually use.
- hex9893628af 5y agoNot to me it isn’t.
- cbm-vic-20 5y agoNo! You must respect the Python ML monoculture! Now hand me my set of MNIST digit images!
- cinntaile 5y agoAlmost all neural network frameworks are Python based, so you're severely limiting yourself here.
- systemsignal 5y agoWhat language do you use?
- asnt 5y agoMaybe not as comprehensive or approachable: Julia: https://juliadiff.org/ChainRulesCore.jl/stable/FAQ.html#Where-can-I-learn-more-about-AD- https://juliadiff.org/ChainRulesCore.jl/stable/FAQ.html#Wher...? (bottom) OCaml: https://ocaml.xyz/book/ https://ocaml.xyz/book/
- rg111 5y ago> that I might actually use The only language that you might actually use is Python.
- p1esk 5y ago“from scratch” == “using numpy and numba”
- shard 5y agoIf you wish to implement the Torch API from scratch, you must first invent the universe. (Apologies to Sagan)
- p1esk 5y ago"from scratch" in this context does not make any sense - Pytorch is already implemented "from scratch" using Python, C++, and CUDA. Implementing Pytorch using Numpy is the opposite of "from scratch".
- shard 5y agoI didn't dig too deeply, however on the pytorch installation page, it says "Please ensure that you have met the prerequisites below (e.g., numpy)" Does pytorch already require numpy?
- p1esk 5y agoIt does, because it can convert a numpy array to a pytorch tensor and back, but I don’t think numpy is used for anything else.
- lostmsu 5y agoThey must be doing something else with numpy as Python has a generic API, that allows direct access to data of numpy array-like structures: Buffer Protocol https://docs.python.org/3/c-api/buffer.html https://docs.python.org/3/c-api/buffer.html
- p1esk 5y agoIt’s not just about access to underlying data - users might want to import from, or export to numpy array (e.g. for visualization, etc).