Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Massa <fvsmassa@gmail.com>2016-01-27 01:17:39 +0300
committerfsuzanomassa <fvsmassa@gmail.com>2016-01-28 01:02:53 +0300
commita02b65fde90a38e4cc0ce04909f9db93bfb52ed9 (patch)
treec7d437b3664d1fa66247f1fbbf455d802a3de68c /THCUNN.lua
parent95724b4fbd6db77efbc34822b8ee7aee23a3f651 (diff)
Add THNN conversion of {Spatial(Adaptive,Average,Max)Pooling} and SpatialConvolutionMM
Diffstat (limited to 'THCUNN.lua')
-rw-r--r--THCUNN.lua90
1 files changed, 90 insertions, 0 deletions
diff --git a/THCUNN.lua b/THCUNN.lua
index 9f66ef0..ee59863 100644
--- a/THCUNN.lua
+++ b/THCUNN.lua
@@ -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 ', '')