Git Product home page Git Product logo

pygrad's Introduction

pygrad

PyGrad is a deep learning framework built mainly for educational purposes. The goal is to reimplment some features that are similar to other well-known Python packages, like PyTorch and TensorFlow. The hope is to have the c++ code wrapped with python functions using cython, but the main, current goal is to have a dense NN trained on MNIST.

To get started with development, you'll need to install the following:

sudo apt install cmake
sudo apt install clang-format

Make sure to use c++ 17 standard. This project uses GoogleTests for unit testing. To run them, use the following commands:

cmake -S . -B build
cmake --build build
cd build && ctest

When compiling the main program, make sure to have the flags -O3 and -fopenmp (this is done automatically with the Makefile).

pygrad's People

Contributors

james-flemings avatar

Watchers

 avatar

pygrad's Issues

[Formatting] Conform to a format standard.

I'm a bit inconsistent with my formatting; I oscillate between camel and snake case. Though there isn't a c++ standard for identifier names, lets shoot for camel case for function and variable names (though most is using camel case).

[Optimization] Move weights from Neuron to Layer.

As the title implies, the framework currently iterates through each neuron in the layer to grab the weights, which is a performance hit. We can move the weights to Layer, but this essentially makes Neuron trivial. May keep Neuron in the future.

[Refactor] Move cost function from Model to a new class Cost.

This way, we can add additional cost functions. Two public functions: cost(...), cost_prime(...) that determine the right functions based off of the std::string cost. Then a bunch of protected functions that implement different cost functions.

Error Checking

Add checks for parameters such as first layer input size = x.size(), output size = y.size(). Add tests to verify these checks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.