bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
ml_example_1.cpp File Reference
#include "cubeai/base/cubeai_config.h"
#include <iostream>
Include dependency graph for ml_example_1.cpp:

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Example 21: Implements a simple logistic regression model with PyTorch. The example is editted from this https://github.com/prabhuomkar/pytorch-cpp/blob/master/tutorials/basics/logistic_regression/main.cpp GitHub repository. The example uses the MNIST dataset The train and test files should be respectively

train images: train-images-idx3-ubyte train labels: train-labels-idx1-ubyte

test images: t10k-images-idx3-ubyte test labels: t10k-labels-idx1-ubyte