34 #ifndef __CONVOLUTION_OPS_HPP__
35 #define __CONVOLUTION_OPS_HPP__
61 template<
class V,
class M,
class T>
68 template<
class V,
class M,
class T>
79 template<
class V,
class M,
class T>
81 convolve2d(
tensor<V,M,T>& dst,
const tensor<V,M,T>& img,
const tensor<V,M,T>& filter,
int paddingStart=0,
unsigned int moduleStride=0,
unsigned int nGroups=0,
float factNew=1.f,
float factOld=0.f);
90 template<
class V,
class M,
class T>
93 int paddingStart=0,
unsigned int moduleStride=0,
unsigned int nGroups=0,
float factNew=1.f,
float factOld=0.f);
103 template<
class V,
class M,
class T>
107 unsigned int moduleStride=0,
unsigned int nGroups=0,
unsigned int partialSum=1,
float factNew=1.f,
float factOld=0.f);
123 template<
class V,
class M,
class T>
125 int subsX,
int startX,
int strideX,
int outputsX,
pool_type pooler);
130 template<
class V,
class M,
class T>
132 const tensor<V,M,T>& maxActs,
int subsX,
int startX,
int strideX,
float factNew=1.f,
float factOld=0.f);
137 template<
class V,
class M,
class T>
139 int subsX,
int startX,
int strideX);
154 template<
class V,
class M,
class T>
155 void response_normalization(
tensor<V,M,T>& target,
tensor<V,M,T>& denoms,
const tensor<V,M,T>& images,
int patchSize,
float addScale,
float powScale);
168 template<
class V,
class M,
class T>
170 const tensor<V,M,T>& delta,
const tensor<V,M,T>& denoms,
int patchSize,
float addScale,
float powScale,
float factNew=1.f,
float factOld=0.f);
186 template<
class V,
class M,
class T>
187 void contrast_normalization(
tensor<V,M,T>& target,
tensor<V,M,T>& denoms,
const tensor<V,M,T>& meanDiffs,
const tensor<V,M,T>& images,
int patchSize,
float addScale,
float powScale);
201 template<
class V,
class M,
class T>
203 const tensor<V,M,T>& delta,
const tensor<V,M,T>& denoms,
int patchSize,
float addScale,
float powScale,
float factNew=1.f,
float factOld=0.f);
212 template<
class V,
class M,
class T>
213 void response_norm_cross_map(
tensor<V,M,T>& target,
tensor<V,M,T>& denoms,
const tensor<V,M,T>& images,
int sizeF,
float addScale,
float powScale,
bool blocked);
218 template<
class V,
class M,
class T>
220 const tensor<V,M,T>& delta,
const tensor<V,M,T>& denoms,
int sizeF,
float addScale,
float powScale,
bool blocked,
float factNew=1.f,
float factOld=0.f);
232 template<
class V,
class M,
class T>
233 void gaussian_blur(
tensor<V,M,T>& target,
const tensor<V,M,T>& images,
const tensor<V,M,T>& filter,
bool horiz,
float factNew=1.f,
float factOld=0.f);
245 template<
class V,
class M,
class T>
258 template<
class V,
class M,
class T>
264 template<
class V,
class M,
class T>
270 template<
class V,
class M,
class T>
283 template<
class V,
class M,
class T>
303 template<
class V,
class M,
class T>