Facebook AI's DINO | PyTorch Code Explained

From the creator

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ JOIN OUR DISCORD COMMUNITY: Discord β–Ί https://discord.gg/peBrCpheKE πŸ“’ SUBSCRIBE TO MY MONTHLY AI NEWSLETTER: Substack β–Ί https://aiepiphany.substack.com/ ❀️ Become The AI Epiphany Patreon ❀️ β–Ί https://www.patreon.com/theaiepiphany With this video, I kick off a brand new series of coding videos in PyTorch where I'll be explaining some of the most impactful AI research through its code analysis! In this video I cover DINO from the "Emerging Properties in Self-Supervised Vision Transformers" paper. β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ βœ… Paper: https://arxiv.org/abs/2104.14294 βœ… Code: https://github.com/facebookresearch/dino β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ ⌚️ Timetable: 00:00 DINO paper - short overview 02:38 Code analysis starts - training arguments (argparse) 07:30 Training main function 08:25 DINO augmentations 11:30 Main function resumed 16:05 DINO head (MLP) 18:05 Main function resumed 20:40 DINO loss overview 21:45 Main function resumed 24:05 Augmentations visualized (matplotlib) 27:00 Main function resumed 28:00 DINO Core part!!! (in-depth shape analysis) 33:45 DINO loss in depth 38:00 Main function resumed 39:50 Visualizing attention script explained 48:15 Outro β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ πŸ’° BECOME A PATREON OF THE AI EPIPHANY ❀️ If these videos, GitHub projects, and blogs help you, consider helping me out by supporting me on Patreon! The AI Epiphany β–Ί https://www.patreon.com/theaiepiphany One-time donation: https://www.paypal.com/paypalme/theaiepiphany Much love! ❀️ Huge thank you to these AI Epiphany patreons: Eli Mahler Petar VeličkoviΔ‡ Zvonimir Sabljic β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ πŸ’‘ The AI Epiphany is a channel dedicated to simplifying the field of AI using creative visualizations and in general, a stronger focus on geometrical and visual intuition, rather than the algebraic and numerical "intuition". β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ πŸ‘‹ CONNECT WITH ME ON SOCIAL LinkedIn β–Ί https://www.linkedin.com/in/aleksagordic/ Twitter β–Ί https://twitter.com/gordic_aleksa Instagram β–Ί https://www.instagram.com/aiepiphany/ Facebook β–Ί https://www.facebook.com/aiepiphany/ πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ JOIN OUR DISCORD COMMUNITY: Discord β–Ί https://discord.gg/peBrCpheKE πŸ“’ SUBSCRIBE TO MY MONTHLY AI NEWSLETTER: Substack β–Ί https://aiepiphany.substack.com/ πŸ’» FOLLOW ME ON GITHUB FOR ML PROJECTS: GitHub β–Ί https://github.com/gordicaleksa πŸ“š FOLLOW ME ON MEDIUM: Medium β–Ί https://gordicaleksa.medium.com/ β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ #dino #pytorch #coding

Choose to Build with AI
Matched to Neural Networks

AI Maker Residence 3

The third AI workshop taught by our legendary teacher, Nick Sarafa. This is a full-day hands-on training workshop for purposeful co-creation with AI using Claude Code. Imagine having access to hundreds of billions of dollars of computing power and knowing exactly how to make it work for you through the power of super intelligence.

β—† Fri 09 Oct 2026 β—† KOKO Cafe, London β—† With Nick Sarafa
AI Maker Residence 3
Live event
AI Maker Residence 3
Fri 09 Oct 2026

More like this

Running one yourself?

List your AI event,
wherever it is.

A meetup, a workshop, a hackathon, a conference. Any city, or online. Tell us about it and it lands in front of people already learning this stuff.