Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Macros
Classes | Namespaces | Functions
tensor_expr_ext.h File Reference

some extension of expressions, used to support something beyond elementwise op More...

#include "tensor_expr_engine-inl.hpp"
#include "tensor_sse-inl.hpp"

Go to the source code of this file.

Classes

struct  mshadow::expr::Broadcast1DExp< Device, dimdst, dimcast >
 broadcast Tensor1D into a higher dimension Tensor input: Tensor<Device,1>: ishape[0] output: Tensor<Device,dimdst> : oshape[dimcast] = ishape[0] More...
 
struct  mshadow::expr::UnpackPatchToColXExp< SrcExp, srcdim >
 unpack local (overlap) patches of image to column of mat, can be used to implement convolution, this expression allow unpack of a batch this is a version support unpacking multiple images after getting unpacked mat, we can use: output = dot( weight, mat ) to get covolved results, the relations: More...
 
struct  mshadow::expr::PackColToPatchXExp< Device, dstdim >
 reverse operation of UnpackPatchToCol, used to backprop gradient back this is a version supporting multiple images More...
 
struct  mshadow::expr::ReshapeExp< SrcExp, dimdst, dimsrc >
 reshape the content to another shape input: Tensor<Device,dimsrc>: ishape output: Tensor<Device,dimdst> ishape.Size() == oshape.Size() More...
 
struct  mshadow::expr::SwapAxisExp< SrcExp, dimsrc, a1, a2 >
 swap two axis of a tensor input: Tensor<Device,dim>: ishape output: Tensor<Device,dimdst> oshape[a1],oshape[a2] = ishape[a2],oshape[a1] More...
 
struct  mshadow::expr::ReduceTo1DExp< EType, Reducer, dimkeep >
 reduction to 1 dimension tensor input: Tensor<Device,k>: ishape output: Tensor<Device,1> shape[0] = ishape[dimkeep]; More...
 
struct  mshadow::expr::PoolingExp< Reducer, SrcExp, srcdim >
 pooling expression, do reduction over local patches of a image More...
 
struct  mshadow::expr::UnPoolingExp< Reducer, Device >
 unpooling expr reverse operation of pooling, used to pass gradient back More...
 
struct  mshadow::expr::PaddingExp< SrcExp, srcdim >
 padding expression, pad a image with zeros More...
 
struct  mshadow::expr::CroppingExp< SrcExp, srcdim >
 crop expression, cut off the boundary region, reverse operation of padding More...
 
struct  mshadow::expr::MirroringExp< SrcExp, srcdim >
 mirror expression, mirror a image in width More...
 
struct  mshadow::expr::ChannelPoolingExp< Reducer, SrcExp, srcdim >
 channel pooling expression, do reduction over (local nearby) channels, used to implement local response normalization More...
 
struct  mshadow::expr::ExpComplexEngine< SV, Device, 1, ReduceTo1DExp< EType, Reducer, dimkeep > >
 
struct  mshadow::expr::ExpComplexEngine< SV, Device, 1, ReduceTo1DExp< EType, Reducer, 0 > >
 
struct  mshadow::expr::Plan< Broadcast1DExp< Device, dimdst, dimcast > >
 execution plan of Broadcast1DExp More...
 
struct  mshadow::expr::Plan< Broadcast1DExp< Device, dimdst, 0 > >
 execution plan of Broadcast1DExp More...
 
struct  mshadow::expr::Plan< UnpackPatchToColXExp< SrcExp, srcdim > >
 
struct  mshadow::expr::Plan< PackColToPatchXExp< Device, dstdim > >
 
struct  mshadow::expr::Plan< ReshapeExp< SrcExp, dimdst, dimsrc > >
 
struct  mshadow::expr::Plan< ReshapeExp< SrcExp, dimdst, 1 > >
 
struct  mshadow::expr::Plan< SwapAxisExp< SrcExp, dimsrc, a1, a2 > >
 
struct  mshadow::expr::Plan< SwapAxisExp< SrcExp, dimsrc, 0, a2 > >
 
struct  mshadow::expr::Plan< PoolingExp< Reducer, SrcExp, srcdim > >
 
struct  mshadow::expr::Plan< UnPoolingExp< Reducer, Device > >
 
struct  mshadow::expr::Plan< PaddingExp< SrcExp, srcdim > >
 
struct  mshadow::expr::Plan< CroppingExp< SrcExp, srcdim > >
 
struct  mshadow::expr::Plan< MirroringExp< SrcExp, srcdim > >
 
struct  mshadow::expr::Plan< ChannelPoolingExp< Reducer, SrcExp, srcdim > >
 
struct  mshadow::expr::SSECheck< Broadcast1DExp< cpu, dimdst, 0 > >
 
struct  mshadow::expr::SSEAlignCheck< 2, Broadcast1DExp< cpu, dimdst, 0 > >
 
class  mshadow::expr::SSEPlan< Broadcast1DExp< cpu, dimdst, 0 > >
 

Namespaces

 mshadow
 namespace for mshadow
 
 mshadow::expr
 namespace for abstract expressions and expressions template, have no dependecy on tensor.h, These data structure takes no charge in computations, they are only used to define operations and represent expression in a symbolic way
 

Functions

template<typename E , typename R , int d>
ReduceTo1DExp< E, R, d > mshadow::expr::operator* (const ReduceTo1DExp< E, R, d > &e, real_t scale)
 operator overload
 
template<typename E , typename R , int d>
ReduceTo1DExp< E, R, d > mshadow::expr::operator* (real_t scale, const ReduceTo1DExp< E, R, d > &e)
 operator overload
 
template<int dimcast, typename Device , int dimdst>
Broadcast1DExp< Device, dimdst,
dimcast > 
mshadow::expr::broadcast (const Tensor< Device, 1 > &src, Shape< dimdst > shape)
 a expression that replicate a 1 dimension tensor in dimension dimcast More...
 
template<typename SrcExp , int etype>
UnpackPatchToColXExp< SrcExp,
ExpInfo< SrcExp >::kDim > 
mshadow::expr::unpack_patch2col (const Exp< SrcExp, etype > &img, index_t psize, index_t pstride)
 unpack local (overlap) patches of image to column of mat, can be used to implement convolution after getting unpacked mat, we can use: output = dot( weight, mat ) to get covolved results, the relations: More...
 
template<typename Device , int dstdim>
PackColToPatchXExp< Device,
dstdim > 
mshadow::expr::pack_col2patch (const Tensor< Device, 2 > &mat, Shape< dstdim > imshape, index_t psize, index_t pstride)
 reverse operation of pack_col2patch, can be used to implement deconvolution More...
 
template<typename SrcExp , int etype, int dimdst>
ReshapeExp< SrcExp, dimdst,
ExpInfo< SrcExp >::kDim > 
mshadow::expr::reshape (const Exp< SrcExp, etype > &src, Shape< dimdst > oshape)
 a expression that reshapes a tensor to another shape More...
 
template<int a1, int a2, typename SrcExp , int etype>
SwapAxisExp< SrcExp, ExpInfo
< SrcExp >::kDim, a1, a2 > 
mshadow::expr::swapaxis (const Exp< SrcExp, etype > &src)
 a expression that reshapes a tensor to another shape More...
 
template<int dimkeep, typename SrcExp , int etype>
ReduceTo1DExp< SrcExp,
red::sum, dimkeep > 
mshadow::expr::sumall_except_dim (const Exp< SrcExp, etype > &exp)
 a sum over all dimensions, except dimkeep More...
 
template<typename Reducer , typename SrcExp , int etype>
PoolingExp< Reducer, SrcExp,
ExpInfo< SrcExp >::kDim > 
mshadow::expr::pool (const Exp< SrcExp, etype > &src, index_t ksize, index_t kstride)
 pooling subregion results together More...
 
template<typename Reducer , typename SrcExp , int etype>
PoolingExp< Reducer, SrcExp,
ExpInfo< SrcExp >::kDim > 
mshadow::expr::pool (const Exp< SrcExp, etype > &src, Shape< 2 > pshape, index_t ksize, index_t kstride)
 same as pool, except the output shape is specified by pshape More...
 
template<typename Reducer , typename Device >
UnPoolingExp< Reducer, Device > mshadow::expr::unpool (const Tensor< Device, 4 > &data_src, const Tensor< Device, 4 > &data_pooled, const Tensor< Device, 4 > &grad_pooled, index_t ksize, index_t kstride)
 unpooling gradient for 4D, backprop gradient value back, revserse operation of pooling More...
 
template<typename SrcExp , int etype>
PaddingExp< SrcExp, ExpInfo
< SrcExp >::kDim > 
mshadow::expr::pad (const Exp< SrcExp, etype > &src, index_t pad)
 padding expression, pad a image with zeros on boundaries, padding affects shape[0], and shape[1] More...
 
template<typename SrcExp , int etype>
CroppingExp< SrcExp, ExpInfo
< SrcExp >::kDim > 
mshadow::expr::crop (const Exp< SrcExp, etype > &src, Shape< 2 > oshape)
 revserse operationg of padding, cut off boundaries, crop output from center of input More...
 
template<typename SrcExp , int etype>
CroppingExp< SrcExp, ExpInfo
< SrcExp >::kDim > 
mshadow::expr::crop (const Exp< SrcExp, etype > &src, Shape< 2 > oshape, index_t start_height, index_t start_width)
 same as crop, but can specify starting position to do cropping More...
 
template<typename SrcExp , int etype>
MirroringExp< SrcExp, ExpInfo
< SrcExp >::kDim > 
mshadow::expr::mirror (const Exp< SrcExp, etype > &src)
 mirroring expression, mirror images in width More...
 
template<typename Reducer , typename SrcExp , int etype>
ChannelPoolingExp< Reducer,
SrcExp, ExpInfo< SrcExp >
::kDim > 
mshadow::expr::chpool (const Exp< SrcExp, etype > &src, index_t nsize)
 channel pooling, do reduction over (local nearby) channels, used to implement local response normalization More...
 
template<typename Device >
Broadcast1DExp< Device, 2, 0 > mshadow::expr::repmat (const Tensor< Device, 1 > &src, index_t nrow)
 a expression that replicate a 1 dimension tensor for nrow times More...
 
template<typename SrcExp , int etype>
ReduceTo1DExp< SrcExp,
red::sum, 0 > 
mshadow::expr::sum_rows (const Exp< SrcExp, etype > &exp)
 a expression that sum over rows of a matrix More...
 

Detailed Description

some extension of expressions, used to support something beyond elementwise op

Author
Tianqi Chen, Bing Xu