Get index tensor efficiently

Now, I have a tensor X with size BCHW, and two index tensor Y and Z with size Bmn. I want to return a tensor M with size BCmn where M[b, :, i, j] = X[b, :, Y[b,i,j], Z[b,i,j]]. How can I do this efficiently by pytorch. Thank you for your attention and answer.