Skip to content
/ Aqua Public
forked from Archive202/Aqua

A C++ library providing tensor variables and calculation of tenso

Notifications You must be signed in to change notification settings

Intro-iu/Aqua

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Aqua

This is a C++ library providing tensor variables and calculation of tensor, which can be used to implement neural networks

Usage

Import

#include <Tensor.hpp>

Declaration

// Aqua::Tensor t<variable_type, num_of_dimension>;
Aqua::Tensor t<double, 2>;

Assignment

Aqua::Tensor t<double, 2> t = {
    {1, 2, 3},
    {4, 5, 6}
};

Operations

Outputting

Tensor<int, 3> t = {{{1, 2, 3}, {4, 5, 6}}, {{1, 2, 3}, {4, 5, 6}}};
t.disp();

// Outputs:
// [[[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]]]

Element Accessing

Tensor<int, 3> t = {{{1, 2, 3}, {4, 5, 6}}, {{1, 2, 3}, {4, 5, 6}}};
cout << t.at(0, 1, 2);

// Outputs:
// 6

About

A C++ library providing tensor variables and calculation of tenso

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.9%
  • CMake 3.1%