The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Learn to train, compress and serve production-grade deep learning models with C++20 and Flashlight
Our starting point was raw CIFAR-10 bytes and a compiler check, and we ended up with residual networks, coroutine pipelines, compressed checkpoints and a real-time classifier built on two cooperating threads.
Whenever we introduced a new technique, we gave it a contract, tested it early and measured it honestly. Our concepts rejected the wrong types before a build was finished, and static assertions caught shape mistakes long before training. Every claim in these chapters had an output we could reproduce.
Minimum price
$29.99
$29.99
About the Book
If you want to build, train, optimize and deploy neural networks using modern C++20, this second edition is the place to start.
This edition has been rewritten from the ground up for C++20 and uses the open-source Flashlight library and the CIFAR-10 image dataset. With every chapter, you'll get a working project, and you'll put all the techniques you learn into practice by compiling, running and measuring code yourself.
In this edition, there's everything you need to set up a reliable C++20 toolchain, load and augment images with ranges, spans and concepts as well as train multilayer perceptrons, convolutional networks and residual networks using a reusable trainer. With weight decay, dropout and batch normalization, you'll see a real improvement in your generalisation. There's also learning rate schedules and transfer learning to explore and implement. In the later chapters, you get to move into production engineering where we learn to stream batches through coroutine pipelines and version checkpoints. We will also be pruning, quantizing and distilling models, and serving real-time OpenCV inference using std::jthread, stop tokens and semaphores. And in the final chapters, we will get into scalability challenges like training with data-parallel replicas, gradient accumulation and mixed precision.
Key Learnings
Table of Content
About the Author
We are the engineer’s publisher, the coder’s mentor, and the content alchemist—meticulously turning dense tech into practical gold. With a growing library of 100+ titles, we don’t just develop technical books, rather we build roadmaps for professionals across Python, MySQL, DevOps, Rust, AI, Kotlin, Arduino, Golang and everything around the massive IT ecosystem. Every chapter, every script, every project is a tool in the hands of developers who want to get things done.
Where others summarize, we construct step-by-step learning blueprints, cutting through clutter, banning the fluff, and ensuring every paragraph delivers hands-on value. Our audience isn’t learning from scratch—they’re leveling up with purpose, and we stand by them with code-first content, consistent project workflows, and a zero-redundancy approach.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.