Dycosystem — Devlog
What’s up guys! This one was mostly math, not code.
Got the Neural_network class doing an actual feedforward pass now, but honestly most of my time this session wasn’t spent typing, it was spent on a whiteboard (well, my head) trying to actually understand the math before I wrote a single line.
The part that took forever
Matrix multiplication only works if the columns of the first matrix match the rows of the second, and figuring out WHY that has to be true, not just memorizing it, is what ate most of my time. Once that clicked, the actual network made a lot more sense: weights between input and hidden layer have to be shaped (hidden_nodes, input_nodes) specifically so the multiplication lines up correctly, same for hidden to output. It’s not arbitrary, the shape IS the math.
What actually got built
- Weight matrices between input→hidden and hidden→output, plus bias matrices for each layer
- A sigmoid function to squash the raw weighted sums into something usable
-
feedforward(input): turn the input into a matrix, multiply by weights, add bias, sigmoid, repeat for the next layer, turn the result back into a normal array
Fed it [1, 0] and got a real guess back out. Random weights so the guess means nothing yet, but the math pipeline actually works end to end now, and I understand every step of it instead of just copying it.
Small but important fix
Weights used to randomize as integers 0-9 which is wrong for a neural network, changed it to floats between -1 and 1, which is what weights are actually supposed to start as.
What’s left
train() exists but does nothing yet. That’s the next math rabbit hole, figuring out how to actually adjust these weights based on how wrong the guess was.
Slower progress than usual but way more understanding behind it. Thanks for reading, see you next devlog!
(I am posting a picture of my dog since I have nothing to post a picture of, this is probably the devlog with the most pictures!)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.