diff options
author | Francisco Massa <fvsmassa@gmail.com> | 2016-01-27 01:17:39 +0300 |
---|---|---|
committer | fsuzanomassa <fvsmassa@gmail.com> | 2016-01-28 01:02:53 +0300 |
commit | a02b65fde90a38e4cc0ce04909f9db93bfb52ed9 (patch) | |
tree | c7d437b3664d1fa66247f1fbbf455d802a3de68c /THCUNN.lua | |
parent | 95724b4fbd6db77efbc34822b8ee7aee23a3f651 (diff) |
Add THNN conversion of {Spatial(Adaptive,Average,Max)Pooling} and SpatialConvolutionMM
Diffstat (limited to 'THCUNN.lua')
-rw-r--r-- | THCUNN.lua | 90 |
1 files changed, 90 insertions, 0 deletions
@@ -151,6 +151,96 @@ TH_API void THNN_CudaLookupTable_accGradParameters( THIntegerTensor *count, THCudaTensor *sorted, THCudaTensor *indices); + +TH_API void THNN_CudaSpatialConvolutionMM_updateOutput( + THCState *state, + THCudaTensor *input, + THCudaTensor *output, + THCudaTensor *weight, + THCudaTensor *bias, + THCudaTensor *columns, + THCudaTensor *ones, + int kW, int kH, + int dW, int dH, + int padW, int padH); +TH_API void THNN_CudaSpatialConvolutionMM_updateGradInput( + THCState *state, + THCudaTensor *input, + THCudaTensor *gradOutput, + THCudaTensor *gradInput, + THCudaTensor *weight, + THCudaTensor *bias, + THCudaTensor *columns, + THCudaTensor *ones, + int kW, int kH, + int dW, int dH, + int padW, int padH); +TH_API void THNN_CudaSpatialConvolutionMM_accGradParameters( + THCState *state, + THCudaTensor *input, + THCudaTensor *gradOutput, + THCudaTensor *gradWeight, + THCudaTensor *gradBias, + THCudaTensor *columns, + THCudaTensor *ones, + int kW, int kH, + int dW, int dH, + int padW, int padH, + float scale); + +TH_API void THNN_CudaSpatialAdaptiveMaxPooling_updateOutput( + THCState *state, + THCudaTensor *input, + THCudaTensor *output, + THCudaTensor *indices, + int nOutputCols, + int nOutputRows); +TH_API void THNN_CudaSpatialAdaptiveMaxPooling_updateGradInput( + THCState *state, + THCudaTensor *input, + THCudaTensor *gradOutput, + THCudaTensor *gradInput, + THCudaTensor *indices); + +TH_API void THNN_CudaSpatialAveragePooling_updateOutput( + THCState *state, + THCudaTensor *input, + THCudaTensor *output, + int kW, int kH, + int dW, int dH, + int padW, int padH, + bool ceil_mode, + bool count_include_pad); +TH_API void THNN_CudaSpatialAveragePooling_updateGradInput( + THCState *state, + THCudaTensor *input, + THCudaTensor *gradOutput, + THCudaTensor *gradInput, + int kW, int kH, + int dW, int dH, + int padW, int padH, + bool ceil_mode, + bool count_include_pad); + +TH_API void THNN_CudaSpatialMaxPooling_updateOutput( + THCState *state, + THCudaTensor *input, + THCudaTensor *output, + THCudaTensor *indices, + int kW, int kH, + int dW, int dH, + int padW, int padH, + bool ceil_mode); +TH_API void THNN_CudaSpatialMaxPooling_updateGradInput( + THCState *state, + THCudaTensor *input, + THCudaTensor *gradOutput, + THCudaTensor *gradInput, + THCudaTensor *indices, + int kW, int kH, + int dW, int dH, + int padW, int padH, + bool ceil_mode); ]] local preprocessed = string.gsub(THCUNN_h, 'TH_API ', '') |