im learning ml and built a machine learning framework in c++.
im calling it 1f4a9, or onef for short.
if you want to use it you can go to onef (b44ken/onef). you can use it like
#include "onef.h"
auto model = onef::Model({
// (1, 1) linear unit is effectively y = mx + b
new onef::Linear(1, 1)
});
// inputs
auto set = onef::Trainer({{0.3}, {1.6}, {1.9}, {2.5}},
// outputs
{{1.1}, {1.4}, {2.0}, {2.1}});
// mean sq. error before and after
std::cout << "loss: " << set.mse(model) << "\n";
set.train_until_convergence(&model);
std::cout << "loss: " << set.mse(model) << "\n";to do list
- backprop
- import weights from json
- cuda acceleration
- world domination