From a24ea9b210b5f31a6699695d7dd917cf6b3efaad Mon Sep 17 00:00:00 2001 From: Zack Siri Date: Fri, 21 Jun 2024 14:34:22 +0700 Subject: [PATCH] correct typo --- src/content/blog/learning-machine-learning-in-elixir.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/blog/learning-machine-learning-in-elixir.md b/src/content/blog/learning-machine-learning-in-elixir.md index af9989c..e5fbc17 100644 --- a/src/content/blog/learning-machine-learning-in-elixir.md +++ b/src/content/blog/learning-machine-learning-in-elixir.md @@ -157,7 +157,7 @@ defmodule LinearRegression do end ``` -In elixir you can use for loops and `Enum.reduce` as well. However if you want to live in `defn` land an experience all the benefits of JIT compilation you'll have to use the `while` loop from elixir's Nx library. You can also get extra benefit by adding `unroll: true`. It will actually unroll your while loop as if you wrote out every iteration by hand. Be careful with unroll though, if you have a lot of iterations in your `range` like 10,000 using `unroll: true` can be a disastor ๐Ÿงจ๐Ÿ˜…. Believe be I've tried. Using something like `unroll: 2` would be more wise. +In elixir you can use for loops and `Enum.reduce` as well. However if you want to live in `defn` land an experience all the benefits of JIT compilation you'll have to use the `while` loop from elixir's Nx library. You can also get extra benefit by adding `unroll: true`. It will actually unroll your while loop as if you wrote out every iteration by hand. Be careful with unroll though, if you have a lot of iterations in your `range` like 10,000 using `unroll: true` can be a disaster ๐Ÿงจ๐Ÿ˜…. Believe be I've tried. Using something like `unroll: 2` would be more wise. ## Axon