Exactly! My research interest is Explainable Deep Learning. Recently, I start to move to Pytorch. I implement some backpropagation approaches. I find the issue. In Keras, it is not the case. My project code is too long to read. You can just load a pre-trained model and add a forward hook function for the max_pool2D layer (better the first one), in the function you have feature_input and the parameters for Pooling, just recalculate it with return of the indices, and use unpool with the indices and the output. You can just print the unpooling result. you will find that the values are often lie on the boundary.