Giter Club home page Giter Club logo

zhetapi's Introduction

Zhetapi Logo

build badge

Zhetapi is a modern C++ machine learning and numerical analysis library with an emphasis on intuitive usage.

Linear Algebra

Zhetapi provides a basic linear algebra interface using C++ 20 concepts. The Field structure enforces a contraint on types to ensure they behave like algebraic fields. As a result these structures support basic arithmetic along with other useful methods.

For now, the following template classes are provided: Tensor, Matrix, Vector.

Auto Differentiation

The auto differentiation facilities in Zhetapi belong in the zhetapi::autograd namespace. All operations that depend on autodiff use floats as the underlying type; in particular Constant is a Tensor <float> and is the basis of all numerical values in this module.

To provide a seamless, operator based interface into the autodiff facilities, two notable classes are provided, Variable and Function. As one can expect, Variables can store arbitrary Constant values, and Functions are compositions of Variables under varying operations. For example:

Function f = x + y;
Function g = x * y;

// f and g are now functions of *two* variables
Constant a = f(1, 2);
Constant b = g(1, 2);

// Composition of functions is done likewise
Function h = f(x, g(x, y)); // NOTE: h is still a function of two variables

Symbolic Differentiation

Backward Pass

Currently, only backward mode is enabled for autograd.

Building

Zhetapi is primarily a header-only library, but for now there are some examples that one can play around with in the experimental directory.

This project is developed using C++ 20. Additional dependenies include PNG (libpng-dev on Ubuntu systems), OpenMP (Optional) and CUDA (Optional).

Generate the build configuration using CMake as follows:

$ cd zhetapi
$ mkdir build && cd build
$ cmake -DZHETAPI_ENABLE_CUDA=<ON|OFF> # ON by default

And build the targets as one would usually do (e.g. make or ninja).

zhetapi's People

Contributors

hibiscus-agi avatar iveevi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.