How trufoox/rnn_from_scratch works
This is a small C++ console application that trains a vanilla RNN to estimate arithmetic results. The user selects an operation and maximum operand; the program initializes weights and enters a training loop that runs recurrent forward passes, computes gradients, updates weights, and prints predictions and errors. Binary vector serialization helpers exist, but the sampled code does not show them being used by training. The map reflects the sampled call flow; no persistence or model-loading connection is established.
Main entry points: rnn.cpp Training loop · AI_Project.cpp CLI entry
Components 6
Console app
- CLI entry
AI_Project/AI_Project.cpp
RNN training
- Training loop
AI_Project/rnn.cpp - Forward pass
AI_Project/rnn.cpp - Backward pass
AI_Project/rnn.cpp
Binary serialization
- Vector serialization
AI_Project/IO.cpp
Other components
- User
Connections 5
- User → CLI entry: selects inputs
AI_Project/AI_Project.cpp - CLI entry → Training loop: starts training
AI_Project/AI_Project.cpp - Training loop → Forward pass: calls
AI_Project/rnn.cpp - Training loop → Backward pass: calls
AI_Project/rnn.cpp - Forward pass → User: prints results
AI_Project/rnn.cpp