Deep Learning Algorithm Implementations 1.0.0
C++ implementations of fundamental deep learning algorithms
Loading...
Searching...
No Matches
utils Namespace Reference

Classes

class  AddFunction
 Addition function. More...
 
class  DotFunction
 Matrix multiplication function. More...
 
class  Function
 Function node in the computational graph. More...
 
class  Matrix
 
class  MulFunction
 Element-wise multiplication function. More...
 
class  SigmoidFunction
 Sigmoid function. More...
 
class  SubFunction
 Subtraction function. More...
 
class  SumFunction
 Sum function. More...
 
class  TransposeFunction
 Transpose function. More...
 
class  Variable
 Variable class that supports automatic differentiation. More...
 

Typedefs

using VariableF = Variable< float >
 
using VariableD = Variable< double >
 
Type Aliases
using MatrixF = Matrix< float >
 Single-precision floating point matrix.
 
using MatrixD = Matrix< double >
 Double-precision floating point matrix.
 

Functions

template std::ostream & operator<<< float > (std::ostream &, const Matrix< float > &)
 
template std::ostream & operator<<< double > (std::ostream &, const Matrix< double > &)
 
template Matrix< float > dot< float > (const Matrix< float > &, const Matrix< float > &)
 
template Matrix< double > dot< double > (const Matrix< double > &, const Matrix< double > &)
 
template float sum< float > (const Matrix< float > &)
 
template double sum< double > (const Matrix< double > &)
 
template float mean< float > (const Matrix< float > &)
 
template double mean< double > (const Matrix< double > &)
 
Non-member Functions
template<typename T >
std::ostream & operator<< (std::ostream &os, const Matrix< T > &matrix)
 Output stream operator for matrix visualization.
 
template<typename T >
Matrix< T > dot (const Matrix< T > &a, const Matrix< T > &b)
 Compute dot product of two matrices.
 
template<typename T >
sum (const Matrix< T > &matrix)
 Calculate sum of all matrix elements.
 
template<typename T >
mean (const Matrix< T > &matrix)
 Calculate mean of all matrix elements.
 

Typedef Documentation

◆ MatrixD

using utils::MatrixD = typedef Matrix<double>

Double-precision floating point matrix.

Examples
/home/runner/work/deep-learning-algo-impls/deep-learning-algo-impls/include/utils/matrix.hpp.

Definition at line 334 of file matrix.hpp.

◆ MatrixF

using utils::MatrixF = typedef Matrix<float>

Single-precision floating point matrix.

Examples
/home/runner/work/deep-learning-algo-impls/deep-learning-algo-impls/include/utils/matrix.hpp.

Definition at line 329 of file matrix.hpp.

◆ VariableD

using utils::VariableD = typedef Variable<double>

Definition at line 274 of file autograd.hpp.

◆ VariableF

using utils::VariableF = typedef Variable<float>

Definition at line 273 of file autograd.hpp.

Function Documentation

◆ dot()

template<typename T >
Matrix< T > utils::dot ( const Matrix< T > &  a,
const Matrix< T > &  b 
)

Compute dot product of two matrices.

Parameters
aFirst matrix
bSecond matrix
Returns
Dot product result
Examples
/home/runner/work/deep-learning-algo-impls/deep-learning-algo-impls/include/utils/matrix.hpp.

Definition at line 155 of file matrix.cpp.

◆ dot< double >()

template Matrix< double > utils::dot< double > ( const Matrix< double > &  ,
const Matrix< double > &   
)

◆ dot< float >()

template Matrix< float > utils::dot< float > ( const Matrix< float > &  ,
const Matrix< float > &   
)

◆ mean()

template<typename T >
T utils::mean ( const Matrix< T > &  matrix)

Calculate mean of all matrix elements.

Parameters
matrixInput matrix
Returns
Mean of all elements
Examples
/home/runner/work/deep-learning-algo-impls/deep-learning-algo-impls/include/utils/matrix.hpp.

Definition at line 171 of file matrix.cpp.

◆ mean< double >()

template double utils::mean< double > ( const Matrix< double > &  )

◆ mean< float >()

template float utils::mean< float > ( const Matrix< float > &  )

◆ operator<<()

template<typename T >
std::ostream & utils::operator<< ( std::ostream &  os,
const Matrix< T > &  matrix 
)

Output stream operator for matrix visualization.

Parameters
osOutput stream
matrixMatrix to output
Returns
Reference to the output stream
Examples
/home/runner/work/deep-learning-algo-impls/deep-learning-algo-impls/include/utils/matrix.hpp.

Definition at line 149 of file matrix.cpp.

◆ operator<<< double >()

template std::ostream & utils::operator<<< double > ( std::ostream &  ,
const Matrix< double > &   
)

◆ operator<<< float >()

template std::ostream & utils::operator<<< float > ( std::ostream &  ,
const Matrix< float > &   
)

◆ sum()

template<typename T >
T utils::sum ( const Matrix< T > &  matrix)

Calculate sum of all matrix elements.

Parameters
matrixInput matrix
Returns
Sum of all elements
Examples
/home/runner/work/deep-learning-algo-impls/deep-learning-algo-impls/include/utils/matrix.hpp.

Definition at line 166 of file matrix.cpp.

◆ sum< double >()

template double utils::sum< double > ( const Matrix< double > &  )

◆ sum< float >()

template float utils::sum< float > ( const Matrix< float > &  )