       assert(ceilf(preToPostScaleY) == preToPostScaleY);
       strideX = preToPostScaleX;
       strideY = preToPostScaleY;
-   }
+
+      //There's the case where the border of pre is made bigger through other connections. Need to calculate difference
+      //between current recv border and actual recv border
+      actualXBorder = (params.nxp-params.preToPostScaleX)/2;
+      actualYBorder = (params.nyp-params.preToPostScaleY)/2;
+   }
+
+   int diffX = actualXBorder - params.preNblt;
+   int diffY = actualYBorder - params.preNbup;
+
+
+   //assert(diffX <= 0 && diffY <= 0);
 
    //Set up pre descriptor
    cudnnTensorDescriptor_t inputDescriptor;

   size_t workspaceMem = device->getMemory()/device->getNumConvKernels();

   int strideX, strideY;
   //One to many case
   if(preToPostScaleX < 1){
      float fmanyScale = (float)1/params.preToPostScaleX;

      params.manyScaleY = fmanyScale;
      strideX = 1;
      strideY = 1;

      //Patch sizes must be odd multiple of many
      if(nxp/params.manyScaleX% 2 == 0 || nyp/params.manyScaleY % 2 == 0){
         printf("cuDNN: Running on a one to many connection with CUDNN must have patch size (%d, %d) be an odd muliple of many (%d, %d)\n", nxp, nyp, params.manyScaleX, params.manyScaleY);
         exit(-1);
      }

      
      //There's the case where the border of pre is made bigger through other connections. Need to calculate difference
      //between current recv border and actual recv border
      //This is calculating what the border would be if this was a one to one connection
      actualXBorder = params.nxp/2;
      actualYBorder = params.nyp/2;
   }
   //Many to one or one to one case
   else{
