mirror of
https://github.com/lucidrains/vit-pytorch.git
synced 2025-12-30 08:02:29 +00:00
Use lru_cache to cache unique (ph, pw, device) position grids, avoiding redundant computation when multiple images share the same patch dimensions. Cache persists across forward passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
13 KiB
13 KiB