programextensions/blender/demos/relu-softmax.xtl

Blender, 5: ReLU and softmax, arrays to video. A tiny network's layers, run by X_eTaL-gpu's Accel library (the functions its GPU runs), shown as bars: ReLU turns z1's negatives to 0, softmax turns each row of z2 into two shares of 1, a step at a time. Every bar's place, size, color and timing, every label and the camera's path are arrays worked out in X_eTaL (demos/ReluSoftmax.xtl); Video.xtl writes them into the script Blender runs. Explained step by step in docs/literate/relu-softmax.org. Run: just demo blender relu-softmax (a few minutes: 901 frames)

source · imports bl: extensions/blender/lib/Blender.xtl; bp: extensions/blender/lib/Bpy.xtl; vd: extensions/blender/lib/Video.xtl; rs: extensions/blender/demos/ReluSoftmax.xtl

script : Char

value · line 17
script ← ((1920, 1080) ʳˢs̲cene 0) c̲at ((2.0 8.0 14.0 23.0 28.0, "relu-softmax") ᵛᵈs̲tills 0) c̲at (ᵛᵈr̲ender "relu-softmax.mp4") c̲at ᵛᵈreport
Used in: _

_ : Int

function · line 18
_ ← "work/explain/run.py" ᵇˡw̲rite! ᵇᵖlauncher

_ : Int

function · line 19
_ ← "work/explain/relu-softmax.py" ᵇˡw̲rite! script

r : Char

value · line 21
r ← "work/explain/run.py" ᵇˡr̲un! "work/explain/relu-softmax.py work/explain/out"
Used in: lines

lines : Box Char

value · line 23
lines ← (n̲ot r = f̲irst "\n") p̲artition r