Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
neural

Neural Network. More...

Collaboration diagram for neural:

Functions

void fold_unfold (Tensor<> &X, Tensor<> &Y)
 folds a tensor X into tensor Y assuming the lexicographical ordering of elements in both tensors is the same but the order is different More...
 
int neural (int n, int m, int d, double sp, World &dw)
 computes a neural network iteration for tensor n*n*m tensor X whose sparsity fraction is sp. Filter W is d*d*m and dense. Y_ij = sum_{k=1}^m sum_{a=1}^d sum_{b=1}^d X_{i+a % n, j+b % n, k} * W_{abk} this algorithm assumes n = 0 (mod d) More...
 
char * getCmdOption (char **begin, char **end, const std::string &option)
 
int main (int argc, char **argv)
 

Detailed Description

Neural Network.

Function Documentation

void fold_unfold ( Tensor<> &  X,
Tensor<> &  Y 
)

folds a tensor X into tensor Y assuming the lexicographical ordering of elements in both tensors is the same but the order is different

Definition at line 12 of file neural_network.cxx.

References CTF::Tensor< dtype >::get_local_data(), and CTF::Tensor< dtype >::write().

char* getCmdOption ( char **  begin,
char **  end,
const std::string &  option 
)

Definition at line 131 of file neural_network.cxx.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 142 of file neural_network.cxx.

References getCmdOption(), neural(), ctf.core::np(), and ctf.core::rank().

int neural ( int  n,
int  m,
int  d,
double  sp,
World dw 
)

computes a neural network iteration for tensor n*n*m tensor X whose sparsity fraction is sp. Filter W is d*d*m and dense. Y_ij = sum_{k=1}^m sum_{a=1}^d sum_{b=1}^d X_{i+a % n, j+b % n, k} * W_{abk} this algorithm assumes n = 0 (mod d)

Definition at line 27 of file neural_network.cxx.

References ctf.core::a, ctf.core::b, CTF::Tensor< dtype >::fill_random(), CTF::Tensor< dtype >::fill_sp_random(), CTF::fold_unfold(), CTF::Tensor< dtype >::norm2(), CTF::World::rank, and CTF::Tensor< dtype >::write().

Referenced by main().