for (int i = 0; i < SPAN; i++){
for (int j = 0; j < LISTSIZE; j++){
int bias0 = i*LISTSIZE*GRID0*GRID0+ j*GRID0*GRID0;
for (int k = 0; k < GRID0; k++){
int bias_k = bias0 + k*GRID0;
for (int l = 0; l < GRID0; l++){
output0[0][k][l][i][j] = input0[(bias_k+l)];
}
}
int bias1 = i*LISTSIZE*GRID1*GRID1+ j*GRID1*GRID1;
for (int k = 0; k < GRID1; k++){
int bias_k = bias1 + k*GRID1;
for (int l = 0; l < GRID1; l++){
output1[0][k][l][i][j] = input1[bias_k+l];
}
}