   THCudaTensor *input = (THCudaTensor*)luaT_checkudata(L, 2, "torch.CudaTensor");
   int dW = luaT_getfieldcheckint(L, 1, "dW");
   int dH = luaT_getfieldcheckint(L, 1, "dH");
+  int padding = luaT_getfieldcheckint(L, 1, "padding");
 
   THCudaTensor *weight = (THCudaTensor*)luaT_getfieldcheckudata(L, 1, "weight", "torch.CudaTensor");
   THCudaTensor *output = (THCudaTensor*)luaT_getfieldcheckudata(L, 1, "output", "torch.CudaTensor");

  long inputHeight  = input->size[1];
  long inputWidth   = input->size[2];
  long batchSize    = input->size[3];
  long outputHeight = (inputHeight - kH) / dH + 1;
  long outputWidth  = (inputWidth - kW) / dW + 1;

  // resize output
  THCudaTensor_resize4d(output, nOutputPlane, outputHeight, outputWidth, batchSize);

    nInputPlane, inputHeight, inputWidth, batchSize,
    nOutputPlane, outputHeight, outputWidth,
    kH, kW,
    -padding, dW,
    0, 1, true
  );

