← Lab
pitstride
confirmedupstream bugPython · timmModel behavior & reasoningJuly 25, 2026
the question
Does timm's PiT feature_info report the correct cumulative downsampling strides under features_only?
what came out
timm's PiT feature_info reports reduction=(stride-1)*2^i instead of the cumulative stride*2^i, so features_only PiT advertises [7,14,28] where the true strides from feature sizes are [8,16,32]. The base is non-power-of-two and names no real downsampling factor; Swin's control base is correct. Fix: reduction=stride*2^i.
method & receipts
- Result: confirmed
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/pitstride