Skip to content

Archive202/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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published