def convDown(hidSums, filters, targets, numModulesX, paddingStart, moduleStride, filterSizeX, imSizeX, numImgColors):
 numGroups = 1
 numFilters = filters.shape[0]
 numImages = hidSums.shape[0]
 numModules = (numModulesX ** 2)
 assert (paddingStart >= 0)
 assert (targets.shape == (numImages, ((numImgColors * imSizeX) * imSizeX)))
 _ConvNet.convDown(hidSums.p_mat, filters.p_mat, targets.p_mat, imSizeX, (- paddingStart), moduleStride, numImgColors, numGroups)

def convDown ( hidSums , filters , targets , numModulesX , paddingStart , moduleStride , filterSizeX , imSizeX , numImgColors ) : numGroups = 1 numFilters = filters . shape [ 0 ] numImages = hidSums . shape [ 0 ] numModules = ( numModulesX ** 2 ) assert ( paddingStart >= 0 ) assert ( targets . shape == ( numImages , ( ( numImgColors * imSizeX ) * imSizeX ) ) ) _ConvNet . convDown ( hidSums . p_mat , filters . p_mat , targets . p_mat , imSizeX , ( - paddingStart ) , moduleStride , numImgColors , numGroups )
hidsums - filters - targets - .