Generate a tensor from two matrices full of indexes (using tf.gather)

What is the Tensorflow equivalent of this Numpy code? The line in question is the last line of this code snippet. I think tf.gather or tf.gather_nd could be used, but I not sure how to combine the two matrices, indexMat1 and indexMat2, into coordinate pairs to pass into tf.gather.

pad_img = input
#pad_img.shape[0] == num of images
#pad_img.shape[1] == num of channels (i.e. RGB colors)
#pad_img.shape[2] == num pixels for image width
#pad_img.shape[3] == num pixels for image height

make select_img

each column of select_img is a flattened convolution window

select_img includes all of the possible convolution windows in pad_img

indexMat2, indexMat3 are coordinate pairs that map pixels from pad_img to select_img

indexMat2 = index matrix calculation
indexMat3 = index matrix calculation

########################################

What is the TF equivalent of the next Numpy line?

########################################
select_img=pad_img[:, :, indexMat2, indexMat3]