pieteeken

pieteeken

Machine Learning in Elixir: Some remarks on chapter 8 version B2.0 and cuda

@seanmor5

Machine Learning in Elixir

Some remarks on chapter 8 version B2.0
seanmor5

page 177
It is already mentioned here:
:discard is forgotten, it must be Stream.chunk_every(batch_size,batch_size, :discard)
I discovered it after an hour or so. First I tried to form chunks that are a multiple of32.
So I have thrown some pictures away and made 1000 >> 960 and 750 >> 630 (page 178). Fortunately there is :discard

page 184
Already mentioned: Use Polaris.Optimizers.adam(learning_rate: 1.0e-4)

page 191:
github.com/onnx/tensorflow_onnx doesn’t exist (anymore).
Why “Exporting models from …”. Why not “Importing …”

page 193:
unk__613 is now unk__615
The link tfhub.def is changed to Find Pre-trained Models | Kaggle

Then for all who were wondering: Why don’t I see “EXLA.Backend<cuda:…” but always
“EXLA.Backend<host:…”
Install the cuda-toolkit (on developer.nvidia.com/cuda-toolkit)

Do not forget to put in your .bashrc!!!:
export PATH=/usr/local/cuda-12./bin${PATH:+:${PATH}}
export PATH=/usr/local/cuda-12.3/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib64
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export XLA_TARGET=cuda120
export EXLA_TARGET=cuda

It did not work with my old graphics card (Geforce GT9600) so I had to buy a new graphics card. An RTX 360, not the most expensive. And it is working now! Everything goes 30-40% faster.

First Post!

pieteeken

pieteeken

The sentence “export PATH=/usr/local/cuda-12./bin${PATH:+:${PATH}}” must be removed/

And the sentence “export LD_LIBRARY_PATH=/usr/local/cuda-12.3/lib64
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}” should be one line.
I discovered that because I did “source .bashrc” and got an error.

Furthermore you can add to the cuda part the next script because you get the warning a numan node is missing.
I don’t know if it is necessesary, cause I don’t know what a numan node is, but anyway…


#!/bin/bash
if [[ “$EUID” -ne 0 ]]; then
echo “Please run as root.”
exit 1
fi
PCI_ID=$(lspci | grep “VGA compatible controller: NVIDIA Corporation” | cut -d’ ’ -f1)
PCI_ID=“0000:$PCI_ID”
FILE=/sys/bus/pci/devices/$PCI_ID/numa_node
echo Checking $FILE for NUMA connection status…
if [[ -f “$FILE” ]]; then
CURRENT_VAL=$(cat $FILE)
if [[ “$CURRENT_VAL” -eq -1 ]]; then
echo Setting connection value from -1 to 0.
echo 0 > $FILE
else
echo Current connection value of $CURRENT_VAL is not -1.
fi
else
echo $FILE does not exist to update.
exit 1
fi

Popular Pragmatic topics Top

Alexandr
Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
simonpeter
When I try the command to create a pair of migration files I get an error. user=&gt; (create-migration "guestbook") Execution error (Ill...
New
mikecargal
Title: Hands-on Rust: question about get_component (page 295) (feel free to respond. “You dug you’re own hole… good luck”) I have somet...
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
New
raul
Page 28: It implements io.ReaderAt on the store type. Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt? ...
New
swlaschin
The book has the same “Problem space/Solution space” diagram on page 18 as is on page 17. The correct Problem/Solution space diagrams ar...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
New
akraut
The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error. lib/pento_web/live/product_l...
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
a.zampa
@mfazio23 I’m following the indications of the book and arriver ad chapter 10, but the app cannot be compiled due to an error in the Bas...
New

Other popular topics Top

PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
AstonJ
Or looking forward to? :nerd_face:
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
foxtrottwist
Here’s our thread for the Keyboardio Atreus. It is a mechanical keyboard based on and a slight update of the original Atreus (Keyboardio ...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New

Latest in PragProg

View all threads ❯