LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::internal Namespace Reference

Functions

template<typename S , typename T , typename U , typename F >
void EntrywiseZipInto (El::Matrix< S, El::Device::CPU > const &A, El::Matrix< T, El::Device::CPU > const &B, El::Matrix< U, El::Device::CPU > &C, F func)
 A binary entrywise map c <- f(a,b). More...
 
template<typename DataT , typename F >
void apply_binary_backprop_operator (El::Matrix< DataT, El::Device::CPU > const &x1, El::Matrix< DataT, El::Device::CPU > const &x2, El::Matrix< DataT, El::Device::CPU > const &dy, El::Matrix< DataT, El::Device::CPU > &dx1, El::Matrix< DataT, El::Device::CPU > &dx2, F f)
 
template<typename S , typename T , typename U , typename R , typename F >
void EntrywiseZipInto (El::Matrix< S, El::Device::CPU > const &A, El::Matrix< T, El::Device::CPU > const &B, El::Matrix< U, El::Device::CPU > const &C, El::Matrix< R, El::Device::CPU > &D, F func)
 A ternary entrywise map c <- f(a,b,c). More...
 
template<typename DataT , typename F >
void apply_ternary_backprop_operator (El::Matrix< DataT, El::Device::CPU > const &x1, El::Matrix< DataT, El::Device::CPU > const &x2, El::Matrix< DataT, El::Device::CPU > const &x3, El::Matrix< DataT, El::Device::CPU > const &dy, El::Matrix< DataT, El::Device::CPU > &dx1, El::Matrix< DataT, El::Device::CPU > &dx2, El::Matrix< DataT, El::Device::CPU > &dx3, F f)
 

Function Documentation

◆ apply_binary_backprop_operator()

template<typename DataT , typename F >
void lbann::internal::apply_binary_backprop_operator ( El::Matrix< DataT, El::Device::CPU > const &  x1,
El::Matrix< DataT, El::Device::CPU > const &  x2,
El::Matrix< DataT, El::Device::CPU > const &  dy,
El::Matrix< DataT, El::Device::CPU > &  dx1,
El::Matrix< DataT, El::Device::CPU > &  dx2,
f 
)

Apply a binary backprop operator to CPU data. The input and output data must be on CPU and must have the same dimensions. Given a binary function $ y = f(x_1,x_2) $, the corresponding BinaryBackPropOperator is a 5-ary function with the arguments $ x_1 $, $ x_2 $, $ dL/dy $, $ dL/dx_1$, $ dL/dx_2 $. The last two arguments should be overwritten when the BinaryBackPropOperator is called.

Definition at line 88 of file operators/math/common.hpp.

◆ apply_ternary_backprop_operator()

template<typename DataT , typename F >
void lbann::internal::apply_ternary_backprop_operator ( El::Matrix< DataT, El::Device::CPU > const &  x1,
El::Matrix< DataT, El::Device::CPU > const &  x2,
El::Matrix< DataT, El::Device::CPU > const &  x3,
El::Matrix< DataT, El::Device::CPU > const &  dy,
El::Matrix< DataT, El::Device::CPU > &  dx1,
El::Matrix< DataT, El::Device::CPU > &  dx2,
El::Matrix< DataT, El::Device::CPU > &  dx3,
f 
)

Apply a ternary backprop operator to CPU data. The input and output data must be on CPU and must have the same dimensions. Given a ternary function $ y = f(x_1,x_2,x_3) $, the corresponding TernaryBackPropOperator is a 6-ary function with the arguments $ x_1 $, $ x_2 $, $ x_3 $, $ dL/dy $, $ dL/dx_1$, $ dL/dx_2 $, $ dL/dx_3 $. The last three arguments should be overwritten when the TernaryBackPropOperator is called.

Definition at line 182 of file operators/math/common.hpp.

◆ EntrywiseZipInto() [1/2]

template<typename S , typename T , typename U , typename F >
void lbann::internal::EntrywiseZipInto ( El::Matrix< S, El::Device::CPU > const &  A,
El::Matrix< T, El::Device::CPU > const &  B,
El::Matrix< U, El::Device::CPU > &  C,
func 
)

A binary entrywise map c <- f(a,b).

Definition at line 38 of file operators/math/common.hpp.

◆ EntrywiseZipInto() [2/2]

template<typename S , typename T , typename U , typename R , typename F >
void lbann::internal::EntrywiseZipInto ( El::Matrix< S, El::Device::CPU > const &  A,
El::Matrix< T, El::Device::CPU > const &  B,
El::Matrix< U, El::Device::CPU > const &  C,
El::Matrix< R, El::Device::CPU > &  D,
func 
)

A ternary entrywise map c <- f(a,b,c).

Definition at line 125 of file operators/math/common.hpp.