Skip to content

andrewldesousa/backprop

Repository files navigation

Backprop

License: MIT Unit Tests

Backprop is a library for automatically differentiation mathematical expressions.

Usage

Add backprop.cpp as include in your project. Start by including the header file in your cmake file.

include_directories("path/to/backprop")

Then include the header file in your source file.

#include "backprop.h"

Binary Classification Example

The following example demonstrates how to train a model to classify a binary dataset.

mkdir build
cd build
cmake ..
make
./and_example

Tests

mkdir build
cd build
cmake ..
make
./tests/test_main

Visualization of the Computational Graph

The computational graph can be visualized using the write_dot function, e.g.

write_dot("graph.dot", loss);

Using a linear regression example, this is the graph generated:

Linear Regression Graph

About

Automatic differentiation in C++ :)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published