NickGnd
Hey all ![]()
I took me a bit more than 1 year but I finally managed to finish “Programming Machine Learning - From Coding to Deep Learning” book and to reproduce all the Python Jupyter notebooks with Nx/Axon of course by running them in Livebook.
Overall, the experience was pretty good. I found the elixir-nx libraries rather stable in terms of APIs even if they are pre 1.0. And when I had doubts or when I stumbled across some potential issues, I’ve reached out for help in Github or here in the forum.
The repository is hosted here
GitHub - nickgnd/programming-machine-learning-livebooks: Programming Machine Learning - Elixir Livebooks · GitHub
Any suggestion, comment, feedback is welcome. ![]()
I wish you a great day! ![]()
Trending in Other Resources
AI assistants now write a lot of our Elixir and Erlang, and they’re fluent at it. What they get wrong is quieter: code that compiles, rea...
New
I just published a free course on building agents using Elixir.
Elixir agents combine language models with tools and feedback loops to ...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Latest Livebook Threads
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
AstonJ
Nice one Nick! Do you think (with your work) it’s a good book for Elixir users? Is it an easy read? If so maybe we should run a book club on it
Paolo Perrotta is a great author - he wrote one of my favourite Ruby books: Metaprpogramming Ruby! Here’s my recollection of it in his spotlight on DT:
NickGnd
Thanks @AstonJ
It is definitely a good and well written book, with a practical approach and only a couple of “heavy-math” chapters. In general I liked it and I found it easy to follow, even if I didn’t have much experience with numpy. In the first chapters I struggled a bit to replicate the examples in Nx, but mainly because I was completely new to the library and to the concepts, that’s part of the game.
I think it can be a valuable reading if you wanna start with ML, on the other hand, the book is 3 years old and given the pace of innovation in ML, maybe there are more up to date resources out there
The basis won’t change tho’, but for example I’d have like some chapters on more advanced topics such as NLP, transformers, reinforcement learning (but I guess they deserve a book on their own
).
I never read it, but I saw a talk on Git by him once and it was great
shawn_leong
@NickGnd This is so timely & amazing. Thank you.
I’ve tried the Dockyard tutorials at first since I didn’t want to leave Elixir-land but soon found it easier to understand nx/axon it after I understood the analogous libraries in Python.
Be happy to provide feedback on the livebooks as I progress.
Have a great day too
NickGnd
Welcome @shawn_leong ! And thanks for the kind words, really appreciated!
Indeed, knowing a bit of numpy and Keras (which are used in the book) can be really helpful to understand Nx/Axon and navigate their APIs.
I didn’t have any experience in ML before reading the book and i never used these python libraries as well (numpy yes, but for other stuff), therefore in some cases I needed to figure out which API to use/compose together the reach the same result illustrated in the book, especially in the first chapters. For instance, my first implementation to initialize the weights with zeroes was:
Then, later on I switched to this one which I believe is more correct:
yes please, I’d love them
Cheers
heinsaris
Hi Nick,
Thank you for doing this. It is really great.
I started reading the book, and follow along with your livebooks. I have only just started so I am only at Chapter two at the moment.
By evaluating your code for the Linear Regression example, I noticed that it always goes through all the iterations, whereas the Python code in the book stops when the error is no longer smaller then the previous error.
By using a reduce_while instead of a reduce in the train function, you could mimic that behaviour. Here is how I changed it:
It will then stop at the 184th iteration, just like in the book
Regards,
Hein
NickGnd
Hey @heinsaris

I’m glad that you are finding the livebooks helpful
Oh now I remember, it was on my todo list, but then I forgot about. Thanks for bringing this up, appreciated!
I’d be really happy if you can open a PR to update the livebook, otherwise I can do that in the next days
Cheers
gbarkhatov
Hey man. I’ve tried ML before that and it looks like this book was the only one that made sense to me. Other were a lot more complicated and math heavy.
Learning Elixir now and I am so happy that you created such repo. Amazing job!
kenichi
Hi @NickGnd - thank you very much for this repo!
I’m only on chapter 3, but was trying to use Nx early on, perhaps too early
I’m getting some fairly different values from the straight elixir you wrote and the numpy code in the book. If you have any advice or spot what’s off, it would be very appreciated!
Thanks!
Aetherus
Great work! Many thanks for the github repo! I’ll start reading this book in no time. However, there’s always something pragmatic I want to know:
NickGnd
Hi @kenichi
thanks for the kinds words and sorry for the late reply.
I just tried your implementation, I copied paste the nx version at the end of the original livebook (see
C3Testmodule) and I’m getting the same exact values as the non-nx versionSee this gist Reply to Kenichi (Programming ML - chapter 3 with nx) · GitHub
Have you found the problem?
Cheers