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 Bookshelf topics Top

iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
mikecargal
Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display) It looks like ​.with_simple_console_no_bg​(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
New
lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
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
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
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
redconfetti
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
New
mcpierce
@mfazio23 I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
siddhant3030
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
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
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
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
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
First poster: joeb
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
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New

Sub Categories: