MMALIB User Guide
MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX_reorderWeights

MMALIB_CNN_convolve_col_smallNo_ixX_ixX_oxX requires that the weights be preprocessed into a specific arrangement. The functions in this module perform that preprocessing and other associated tasks.

This preprocessing can be done offline (more efficient) or at runtime. The input weights are assumed to be stored as illustrated in this Python pseudocode:

print('{')
for g in range(0, numGroupsPerKernel):
for no in range(0, No):
for ni in range(0, Ni):
for row in range(0, Fr):
for col in range(0, Fc):
print("{:>3}, ".format(pWeights[no + g*No, ni, row, col]), end='')
for b in range(0,numBiasVals):
print('{:>5}'.format(pBias[no + g*No, b])), end=',')
print('')
print('')
print('};')