     assert(maxGrads.isSameDims(maxActs));
     assert(numFilters % 16 == 0);
 //    assert(numImages % 128 == 0);
-
+    
     assert(strideX <= subsX);
-
+    
     target.resize(images);
     assert(target.isContiguous());
     int imgsPerThread = numImages % 128 == 0 ? 4 : numImages % 64 == 0 ? 2 : 1;

    assert(imgSize * imgSize == imgPixels);
    assert(meanDiffs.isSameDims(images));
    assert(sizeF > 0 && sizeF <= numFilters);

    assert(!meanDiffs.isTrans());
    assert(!images.isTrans());
    assert(images.isContiguous());

 * Block size 1x128
 * blockIdx.x determines pixel.x, image idx in batches of 128*imgsPerThread
 * blockIdx.y determines pixel.y
 * 
 * So each block does one output for some number of images and all the fliters.
 * 
 * threadIdx.x determines img idx
 * 
 * imgs:        (numFilters, imgPixels, numImages)
 * meanDiffs:   (numFilters, imgPixels, numImages)
 * denoms:      (numFilters, imgPixels, numImages) (out)
 * target:      (numFilters, imgPixels, numImages) (out)
 * 
 * numImages must be divisible by B_X*imgsPerThread if checkCaseBounds is false
 * numFilters must be divisible by B_Y*filtersPerThread
 */
