@ptrblck should it be like this
def image_concatenate(image, crop_num1, crop_num2, dim1, dim2):
    """concatenate images
    Args :
        image : output images (should be square)
        crop_num2 (int) : number of crop in horizontal way (2)
        crop_num1 (int) : number of crop in vertical way (2)
        dim1(int) : vertical size of output (512)
        dim2(int) : horizontal size_of_output (512)
    Return :
        div_array : numpy arrays of numbers of 1,2,4
    """
    image= crop_num1*crop_num2
    crop_size = image # size of crop
    empty_array = np.zeros([dim1, dim2]).astype("float64")  # to make sure no overflow
    print(empty_array.shape)

    dim1_stride = stride_size(dim1, crop_num1, crop_size)  # vertical stride
    dim2_stride = stride_size(dim2, crop_num2, crop_size)  # horizontal stride
    index = 0
    for i in range(crop_num1):
        for j in range(crop_num2):
            # add image to empty_array at specific position
            empty_array[dim1_stride*i:dim1_stride*i + crop_size,
                        dim2_stride*j:dim2_stride*j + crop_size] += image[index]
            index += 1
    return empty_array

still crashing in the second iteration

TypeError: 'int' object is not subscriptable

also, the results of the first iteration, does not make sense to me the training loss and the accuracy are above 80 is it possible?
Epoch 1 Train loss: 0.820307083427906 Train acc 0.893951416015625
Epoch 2 Train loss: 0.8146810382604599 Train acc 0.8943264484405518
Epoch 3 Train loss: 0.8138034269213676 Train acc 0.8945329189300537
Epoch 4 Train loss: 0.8148394525051117 Train acc 0.894050121307373
Epoch 5 Train loss: 0.8261850923299789 Train acc 0.8950645923614502