GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Tensor-Array/Tensor-Array: A C++ machine learning framework/library.

BranchesTags
Open more actions menu

Latest commit

 

History

398 Commits
398 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
Dockerfolder
Dockerfolder
 
 
cmake
cmake
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Config.cmake.in
Config.cmake.in
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 

Repository files navigation

Tensor-Array

C++ Docker Image Size with architecture (latest by date/latest semver)

A C++ Tensor library that can be used to work with machine learning or deep learning project.

Build your own neural network models with this library.

Installing Tensor-Array

You need to clone repository by using Git

You need to install Tensor-Array with CMake

git clone https://github.com/Tensor-Array/Tensor-Array.git
cd Tensor-Array
mkdir build
cd build
cmake ..
cmake --build .
cmake --install .
cd ..

Why this repository named Tensor-Array

We created a template struct that named TensorArray. That struct is a multi-dimensional array wrapper.

#include <tensor-array/core/tensorbase.hh>

using namespace tensor_array::value;

int main()
{
  TensorArray<float, 4, 4> example_tensor_array =
  {{
    {{ 1, 2, 3, 4 }},
    {{ 5, 6, 7, 8 }},
    {{ 9, 10, 11, 12 }},
    {{ 13, 14, 15, 16 }},
  }};
  return 0;
}

That code is wrapping for:

int main()
{
  float example_tensor_array[4][4] =
  {
    { 1, 2, 3, 4 },
    { 5, 6, 7, 8 },
    { 9, 10, 11, 12 },
    { 13, 14, 15, 16 },
  };
  return 0;
}

The Tensor class.

The Tensor class is a storage that store value and calculate the tensor.

The Tensor::calc_grad() method can do automatic differentiation.

The Tensor::get_grad() method can get the gradient after call Tensor::calc_grad().

#include <iostream>
#include <tensor-array/core/tensor.hh>

using namespace std;
using namespace tensor_array::value;

int main()
{
  TensorArray<float, 4, 4> example_tensor_array =
  {{
    {{ 1, 2, 3, 4 }},
    {{ 5, 6, 7, 8 }},
    {{ 9, 10, 11, 12 }},
    {{ 13, 14, 15, 16 }},
  }};
  TensorArray<float> example_tensor_array_scalar = {100};
  Tensor example_tensor_1(example_tensor_array);
  Tensor example_tensor_2(example_tensor_array_scalar);
  Tensor example_tensor_sum = example_tensor_1 + example_tensor_2;
  cout << example_tensor_sum << endl;
  example_tensor_sum.calc_grad();
  cout << example_tensor_1.get_grad() << endl;
  cout << example_tensor_2.get_grad() << endl;
  return 0;
}

About

A C++ machine learning framework/library.

tensor-array.github.io/Tensor-Array/

Topics

automatic-differentiationbackward-propagationcppdeep-learningdeep-neural-networksdeep-reinforcement-learninggpugpu-computingmachine-learningmulti-dimensional-arrayneural-networktensortensor-interpreter

Resources

Readme
Apache-2.0 license

Security policy

Security policy
Activity
Custom properties

Stars

3 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.