Problem with chapter 7 of Machine learning in Elixir book

I am following along with the book Machine learning in Elixir and got weird result in chapter 7 training the model (either MLP or convolutionnal), I always get the equivalent of a coin flip when training the model.

I downloaded the code given with the book with only one change, i replace :

  Path.wildcard("train/*.jpg")

with :

  Path.wildcard("/home/myUser/Documents/code/train/*.jpg")

To access the correct folder from the absolute path.

The results :

I am using Elixir 1.16.2 and erlang 26.2.3 if that matters.

Is there someone that also got this problem ?

1 Like

What version of Axon does this Livebook use? Does pointing to main on GitHub (soon to be released 0.7) fix it?

1 Like

I have been coding for 6 months with elixir and didn’t know it was possible to point to main for a dependency !

It effectively made the result far better (the livebook used version 0.5 before my change).

Would you recommend using the Axon main Github branch for following the rest of your book ?

Nice work on this book by the way.

I had the exact same issue and switching to Axon 0.7 made it work.

I am trying to finish reading the Programming Machine Learning from PragProg. This book is going to be next, although I need to have an Elixir refresher. :slight_smile: