Tiny-Classifier.cpp – Our First Tiny Classifier
11 hours ago
- #neural-networks
- #C++
- #machine-learning
- The author recounts their first paid programming work in neural networks in 1985 and their recent re-engagement with the subject through Welch Labs' YouTube videos.
- A C++ implementation of a neural network classifier is discussed, inspired by Welch Labs' second video, focusing on geographical coordinates (longitude and latitude) of cities.
- The model uses two examples: one with longitude for three cities and another with both longitude and latitude for four cities.
- Training data includes geolocations for Madrid, Paris, Berlin, and Barcelona, with random selection for training examples.
- The neural network's architecture involves neurons with weights and biases, initialized randomly, and uses softmax for probability distribution over cities.
- Gradient descent is employed for learning, adjusting weights and biases based on derivatives to minimize loss.
- The implementation includes tracking model performance through cross-entropy loss and accuracy metrics, visualized with exponential decay functions.
- Experiments with different learning rates (alpha) show variations in learning speed and model convergence.
- The two-dimensional model (using both longitude and latitude) takes longer to train but achieves high accuracy.
- The author invites experimentation with parameters like learning rate and acknowledges contributors for reviewing drafts.