Introduction

In this article I’ll present a beginner-oriented framework implementing neural networks in C++. The main goal of this code is to understand the root of neural networks for beginners, it also allows multiple modifications which are usually hard to implement in classical high-level framework (Pytorch, Tensorflow, Keras etc…).

So this code can also be used for some research because you can also do things you couldn’t do in other frameworks.

In this article:

  1. Features of the framework
  2. Neural networks from scratch
  3. Framework design
  4. Exotic backpropagation-free optimizer: Shaking Tree optimizer
  5. What I learned doing this
  6. Github repository

Let’s go!

1. Features of the framework

  • Graph implementation of neural network (no matrices)
  • Neural network, neurons and edges as explicit objects
  • Only multilayer perceptrons with Linear/ReLU/Sigmoid activations
  • No parallel computations, no optimizations, no convolutional layers
  • Exotic backpropagation-free optimizer

2. Neural networks from scratch

Neural networks can be interpreted in two ways. The “graph” way and the “matrix” way. When you begin with neural networks, people usually teach you the “graph” way:

Image for post

#neural-network-algorithm #framework #c #deep-learning #c++

Neural Network in C++ From Scratch and Backprop-Free Optimizers
3.85 GEEK