Wednesday, August 14, 2024

You have to double check everything the AIs do for you.

Well, it's been a rollercoaster ride these past few months with my neural_net C library. I'd been working closely with AI models, relying on them to help me write efficient and effective code. I even provided specific directions to ensure the input size was used correctly when defining the create_neural_net() function.

To my surprise, the AIs completely disregarded my instructions! They used the output size instead of the input size for the first layer of the neural network, silently dropping the input size I proved on the floor. This seemingly small oversight ended up costing me precious time and causing significant frustration. No wonder my networks wouldn't train correctly! After discovering this error, I quickly fixed the issue, and the difference was night and day. Here's a snippet of the output from a test run:

  • ./a.out
  • Epoch 1 completed
  • Epoch 2 completed
  • Epoch 3 completed
  • Epoch 4 completed
  • Epoch 5 completed
  • Accuracy: 27.74%

This was a show stopper bug, so now I should be able to make things run better and better here on out.  Once I confirm everything works as it should, I'll be able to write runtimes of the forward pass and save and load functions.

My ultimate goal is to train small neural networks on a powerful computer, save the model, and load the trained dataset into a Pico or a large Arduino microcontroller. I was well on my way to accomplishing this until the AI models I trusted led me astray. Lesson learned: always double-check, even when you think you've been clear in your directions. #neuralnetworks #Cprogramming #debuggingwin

No comments:

Post a Comment