pyhgf.model.conv.max_pool_adapter#
- pyhgf.model.conv.max_pool_adapter(pool_size=(2, 2), stride=None)[source]#
Build a frozen max-pool: block-max forward, winner-take-all backward.
Forward, each non-overlapping (or strided) window’s taps are gathered as an explicit stack (the same strided-slice-per-tap construction as
avg_pool_adapter()’s backward) and reduced withjnp.max, the winning tap index cached alongside. Backward routes the incoming gradient only to the tap that won each window and zero everywhere else, a scatter written in closed form rather than obtained by differentiating the maximum. Ties go to the lowest tap index, the tie-breakjnp.argmaxapplies.