Thanks for the clarification.
Are average pooling(in the example of your given link) and adaptive pooling the same?
Is there some example codes or links where adaptive layer was first used to make it to desirable shape and then pass it in the model.