shawn_leong
Machine Learning in Elixir: Nx.random_uniform/1 is deprecated. (B1.0, Chapter 6, Page 128)
Hey @seanmor5 ,
Similar to the errata on deprecation on page 44, on page 128:
Nx.random_uniform({})
|> NeuralNetwork.predict(w1, b1, w2, b2
Raises a warning
warning: Nx.random_uniform/1 is deprecated. Use Nx.Random.uniform/2 instead
It still works for now but thought we’d stay up to date with the Nx API.
So I believe an updated line would be
{input, _new_key} = Nx.Random.uniform(new_key)
NeuralNetwork.predict(input, w1, b1, w2, b2)
Hope it helps!
Shawn
Edit: As I’m writing this, I see that’s the case in the supplementary Livebooks.
Marked As Solved
seanmor5
Author of Genetic Algorithms in Elixir
I think this has been addressed. Thank you!
Popular Pragmatic Bookshelf topics
As per the title, thanks.
New
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
Hi Travis! Thank you for the cool book! :slight_smile:
I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
Dear Sophie.
I tried to do the “Authorization” exercise and have two questions:
When trying to plug in an email-service, I found the ...
New
#book-python-testing-with-pytest-second-edition
Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon exa...
New
When installing Cards as an editable package, I get the following error:
ERROR: File “setup.py” not found. Directory cannot be installe...
New
I am using Android Studio Chipmunk | 2021.2.1 Patch 2
Build #AI-212.5712.43.2112.8815526, built on July 10, 2022
Runtime version: 11.0....
New
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
New
Getting an error when installing the dependencies at the start of this chapter:
could not compile dependency :exla, "mix compile" failed...
New
Other popular topics
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor?
Also, I want to know if someone is using it for program...
New
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
Hi folks,
I don’t know if I saw this here but, here’s a new programming language, called Roc
Reminds me a bit of Elm and thus Haskell. ...
New
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol:
bre...
New
The File System Access API with Origin Private File System.
WebKit supports new API that makes it possible for web apps to create, open,...
New
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
There appears to have been an update that has changed the terminology for what has previously been known as the Taskbar Overflow - this h...
New
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
Ask Me Anything with
Mark Volkmann
@mvolkmann
On February 24 and 25, we are giving you a chance to ask questions of PragProg author M...
New
Ok, well here are some thoughts and opinions on some of the ergonomic keyboards I have, I guess like mini review of each that I use enoug...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /python
- /js
- /security
- /go
- /swift
- /vim
- /clojure
- /haskell
- /emacs
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /html
- /centos
- /php
- /zig
- /deepseek
- /scala
- /textmate
- /sublime-text
- /lisp
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /django
- /revery
- /ubuntu
- /spring
- /manjaro
- /deno
- /nodejs
- /diversity
- /lua
- /julia
- /slackware
- /c






