'Dive into Deep Learning' book cover
Dive into Deep Learning, an open source, interactive book provided in a unique form factor that integrates text, mathematics and code, recently added a new chapter on attention mechanisms.

Amazon team adds key programming frameworks to Dive into Deep Learning book

With PyTorch and TensorFlow incorporated, the authors hope to gain a wider audience.

Over the past few years, a team of Amazon scientists has been developing a book that is gaining popularity with students and developers attracted to the booming field of deep learning, a subset of machine learning focused on large-scale artificial neural networks. Called Dive into Deep Learning, the book arrives in a unique form factor, integrating text, mathematics, and runnable code. Drafted entirely through Jupyter notebooks, the book is a fully open source living document, with each update triggering updates to the PDF, HTML, and notebook versions.

Its authors are Aston Zhang, an AWS senior applied scientist; Zachary Lipton, an AWS scientist and assistant professor of Operations Research and Machine Learning at Carnegie Mellon University; Mu Li, AWS principal scientist; and Alex Smola, AWS vice president and distinguished scientist.

Recently the authors added two programming frameworks to their book: PyTorch and TensorFlow. That gives the book—originally written for MXNet—even broader appeal within the open-source machine-learning community of students, developers, and scientists. The book also is incorporated into Amazon Machine Learning University courseware.

Amazon Science spoke to the authors previously about their book, and we recently reconnected with them to learn about the significance of the new frameworks they’ve added to their book.

Q. What’s the significance of adding PyTorch and TensorFlow implementations to Dive into Deep Learning?

Mu Li: The book is designed to teach people different algorithms used in machine learning. A big asset of the book is the fact we provide all the coding information. Originally, we used MXNet because it’s a major interface and easy to learn. But then we started getting a lot of requests for PyTorch and TensorFlow implementations. So, we decided to add them to the book.

Aston Zhang: Another factor is that for machine learning practitioners, it’s not enough to know just one framework. That’s because a researcher may propose a new model or algorithm and provide implementation in only one framework. So, if you don’t know that framework, you can’t work with the model. Dive into Deep Learning now provides a way to address those different implementations. It fixes a pain point for our readers.

Zachary Lipton: Like any good product, you have to pay attention to what people are doing. And the audience available for a book that's only available in one framework is somewhat limited. Already, a great team from IIT Roorkee asked us if they could translate the code portions of our book, yielding a PyTorch version, and we gave it our blessing. We knew that a massive audience of students and practitioners would be excited for the PyTorch and TensorFlow versions.

Q. How does the change make the book better?

Alex Smola: The book is basically a collection of Jupyter notebooks – you can read the book in your web browser and run every code example in real time. Because we support multiple frameworks, we can have multiple code paths within each notebook, so you can compare both the implementations, and the results that they give side by side. That’s very powerful as a teaching tool.

Mu Li: We feel that by adding PyTorch and TensorFlow to Dive into Deep Learning, we’ve made it the best textbook to learn about and execute machine learning and deep learning. It’s a textbook, but also teaches you how to implement the code. Another thing is that some people already using PyTorch want to systematically learn deep learning. Now they can run different algorithms from scratch and learn how to do that in different frameworks.

Zachary Lipton: Nobody can survive as a professional in machine learning without having the skills to work with multiple frameworks. You might learn in MXNet or TensorFlow, but then switch jobs, and need to rapidly port those skills over to a place that uses PyTorch when you’re not familiar with it. In general, it’s important for people to learn several languages.

Q. Is any one of the frameworks superior to the others?

Alex Smola: Each of them has some advantages over the other and given the state of the open-source landscape, those advantages constantly shift. They’re all competing with each other for which is the fastest, most usable, has the best data loaders and so on. At one point, people argued that philosophy was best written in German, and music best written in Italian. If you want to have the widest audience, you don’t want to limit yourself to one approach to doing things.

Aston Zhang: We’re not asking our readers to use just one framework. We provide three implementations. Readers can click on each framework, learn how it works, and decide what works best for them. If you’re a new user, you can see the subtle differences between the three and can compare their speed. Also, we separate text and code—the text is framework-neutral, but in the code book we ask people to contribute material. We’ve had people from Google, Alibaba, IIT students and others add material. For the first few chapters, Anirudh Dagar and Yuan Tang have contributed most of the PyTorch and TensorFlow adaptations.. Many others have also helped with the adaptations to these frameworks.

Zachary Lipton: The book is starting to be useful as a Rosetta stone of sorts to allow practitioners to see what the best strategy is to solve the same problem in multiple frameworks— MXNet, PyTorch, TensorFlow—without having to chase down incompatible and idiosyncratic variants on GitHub.

Q. Was it challenging to add the different frameworks to the book?

Mu Li: Yes! PyTorch and MXNet are similar, but TensorFlow is pretty different. Fortunately, TensorFlow 2.0 is very different from TensorFlow 1.0, and closer to MXNet.

Alex Smola: The proper tuning and refinement of the models took quite a while to ensure the implementations for TensorFlow on modern convolutional neural networks were just as good as the ones in PyTorch and MXNet. That’s due to the different ways in how the frameworks implement things. And we still need to back-port the content into Mandarin. This isn’t a trivial endeavor, because there currently isn’t great tooling available to synch the text with the source code.

Q. What has been the response to the additions to Dive into Deep Learning?

Mu Li: Very good. In the past three months, compared with the prior three, we’ve seen about a 40 percent increase in users.

Q. What motivates you to continue improving Dive into Deep Learning?

Alex Smola: We write books because we want to teach and share content. It’s also our way of saying “thanks” to the machine-learning community. The book is a key enabler for spreading knowledge about machine learning and its applications much more widely. We want to make it easy for people to come in, learn about machine learning, and then surprise us with their additions to the book.

Zach Lipton: I don't think anyone involved in the project thinks of it as a book that will someday be finished, in the traditional sense. Having everything online, we can update and add material much, much more quickly than if it were made from dead trees.

Aston Zhang: Every day we get feedback from users around the world. Their comments, suggestions, encouragement, and endorsement motivates me to continue improving our book.

Research areas

Related content

US, NY, New York
The Sponsored Products and Brands (SPB) team at Amazon Ads is re-imagining the advertising landscape through state-of-the-art generative AI technologies, revolutionizing how millions of customers discover products and engage with brands across Amazon.com and beyond. We are at the forefront of re-inventing advertising experiences, bridging human creativity with artificial intelligence to transform every aspect of the advertising lifecycle from ad creation and optimization to performance analysis and customer insights. We are a passionate group of innovators dedicated to developing responsible and intelligent AI technologies that balance the needs of advertisers, enhance the shopping experience, and strengthen the marketplace. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. The Off-Search team within Sponsored Products and Brands (SPB) is focused on building delightful ad experiences across various surfaces beyond Search on Amazon—such as product detail pages, the homepage, and store-in-store pages—to drive monetization. Our vision is to deliver highly personalized, context-aware advertising that adapts to individual shopper preferences, scales across diverse page types, remains relevant to seasonal and event-driven moments, and integrates seamlessly with organic recommendations such as new arrivals, basket-building content, and fast-delivery options. To execute this vision, we work in close partnership with Amazon Stores stakeholders to lead the expansion and growth of advertising across Amazon-owned and -operated pages beyond Search. We operate full stack—from backend ads-retail edge services, ads retrieval, and ad auctions to shopper-facing experiences—all designed to deliver meaningful value. Curious about our advertising solutions? Discover more about Sponsored Products and Sponsored Brands to see how we’re helping businesses grow on Amazon.com and beyond! Key job responsibilities This role will be pivotal in redesigning how ads contribute to a personalized, relevant, and inspirational shopping experience, with the customer value proposition at the forefront. Key responsibilities include, but are not limited to: - Contribute to the design and development of GenAI, deep learning, multi-objective optimization and/or reinforcement learning empowered solutions to transform ad retrieval, auctions, whole-page relevance, and/or bespoke shopping experiences. - Collaborate cross-functionally with other scientists, engineers, and product managers to bring scalable, production-ready science solutions to life. - Stay abreast of industry trends in GenAI, LLMs, and related disciplines, bringing fresh and innovative concepts, ideas, and prototypes to the organization. - Contribute to the enhancement of team’s scientific and technical rigor by identifying and implementing best-in-class algorithms, methodologies, and infrastructure that enable rapid experimentation and scaling. - Mentor and grow junior scientists and engineers, cultivating a high-performing, collaborative, and intellectually curious team. A day in the life As an Applied Scientist on the Sponsored Products and Brands Off-Search team, you will contribute to the development in Generative AI (GenAI) and Large Language Models (LLMs) to revolutionize our advertising flow, backend optimization, and frontend shopping experiences. This is a rare opportunity to redefine how ads are retrieved, allocated, and/or experienced—elevating them into personalized, contextually aware, and inspiring components of the customer journey. You will have the opportunity to fundamentally transform areas such as ad retrieval, ad allocation, whole-page relevance, and differentiated recommendations through the lens of GenAI. By building novel generative models grounded in both Amazon’s rich data and the world’s collective knowledge, your work will shape how customers engage with ads, discover products, and make purchasing decisions. If you are passionate about applying frontier AI to real-world problems with massive scale and impact, this is your opportunity to define the next chapter of advertising science. About the team The Off-Search team within Sponsored Products and Brands (SPB) is focused on building delightful ad experiences across various surfaces beyond Search on Amazon—such as product detail pages, the homepage, and store-in-store pages—to drive monetization. Our vision is to deliver highly personalized, context-aware advertising that adapts to individual shopper preferences, scales across diverse page types, remains relevant to seasonal and event-driven moments, and integrates seamlessly with organic recommendations such as new arrivals, basket-building content, and fast-delivery options. To execute this vision, we work in close partnership with Amazon Stores stakeholders to lead the expansion and growth of advertising across Amazon-owned and -operated pages beyond Search. We operate full stack—from backend ads-retail edge services, ads retrieval, and ad auctions to shopper-facing experiences—all designed to deliver meaningful value. Curious about our advertising solutions? Discover more about Sponsored Products and Sponsored Brands to see how we’re helping businesses grow on Amazon.com and beyond!
US, WA, Seattle
MULTIPLE POSITIONS AVAILABLE Employer: AMAZON.COM SERVICES LLC Offered Position: Data Scientist III Job Location: Seattle, Washington Job Number: AMZ9674365 Position Responsibilities: Own the data science elements of various products to help with data-based decision making, product performance optimization, and product performance tracking. Work directly with product managers to help drive the design of the product. Work with Technical Product Managers to help drive the build planning. Translate business problems and products into data requirements and metrics. Initiate the design, development, and implementation of scientific analysis projects or deliverables. Own the analysis, modelling, system design, and development of data science solutions for products. Write documents and make presentations that explain model/analysis results to the business. Bridge the degree of uncertainty in both problem definition and data scientific solution approaches. Build consensus on data, metrics, and analysis to drive business and system strategy. Position Requirements: Master's degree or foreign equivalent degree in Statistics, Applied Mathematics, Economics, Engineering, Computer Science or a related field and two years of experience in the job offered or a related occupation. Employer will accept a Bachelor's degree or foreign equivalent degree in Statistics, Applied Mathematics, Economics, Engineering, Computer Science, or a related field and five years of progressive post-baccalaureate experience in the job offered or a related occupation as equivalent to the Master's degree and two years of experience. Must have one year of experience in the following skills: (1) building statistical models and machine learning models using large datasets from multiple resources; (2) building complex data analyses by leveraging scripting languages including Python, Java, or related scripting language; and (3) communicating with users, technical teams, and management to collect requirements, evaluate alternatives, and develop processes and tools to support the organization. Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation. 40 hours / week, 8:00am-5:00pm, Salary Range $162,752/year to $215,300/year. Amazon is a total compensation company. Dependent on the position offered, equity, sign-on payments, and other forms of compensation may be provided as part of a total compensation package, in addition to a full range of medical, financial, and/or other benefits. For more information, visit: https://www.aboutamazon.com/workplace/employee-benefits.#0000
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the extreme. We focus on creating entirely new products and services with a goal of positively impacting the lives of our customers. No industries or subject areas are out of bounds. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. Here at Amazon, we embrace our differences. We are committed to furthering our culture of inclusion. We have thirteen employee-led affinity groups, reaching 40,000 employees in over 190 chapters globally. We are constantly learning through programs that are local, regional, and global. Amazon’s culture of inclusion is reinforced within our 16 Leadership Principles, which remind team members to seek diverse perspectives, learn and be curious, and earn trust. Our team highly values work-life balance, mentorship and career growth. We believe striking the right balance between your personal and professional life is critical to life-long happiness and fulfillment. We care about your career growth and strive to assign projects and offer training that will challenge you to become your best.
US, CA, Sunnyvale
Amazon Devices is an inventive research and development company that designs and engineer high-profile devices like Echo, Fire Tablets, Fire TV, and other consumer devices. We are looking for exceptional scientists to join our Applied Science team to help build industry-leading technology with multimodal language models for various edge applications. This role is for a Sr. Applied Scientist to lead science efforts for on-device inference pipelines and orchestration, working closely with cross-functional product and engineering teams to invent, design, develop, and validate new AI features for our devices. Key job responsibilities * Lead cross-functional efforts to invent, design, develop, and validate new AI features for our devices * Invent, build, and evaluate model inference and orchestrations to enable new customer experiences * Drive partnerships with product and engineering teams to implement algorithms and models in production * Train and optimize state-of-the-art multimodal models for resource-efficient deployment * Work closely with compiler engineers, hardware architects, data collection, and product teams A day in the life As an Applied Scientist with the Silicon and Solutions Group Edge AI team, you'll contribute to science solution design, conduct experiments, explore new algorithms, develop embedded inference pipelines, and discover ways to enrich our customer experiences. You'll have opportunities to collaborate across teams of engineers and scientists to bring algorithms and models to production. About the team Our Devices team specializes in inventing new-to-world, category creating products using advanced machine learning technologies. This role is on a new cross-functional team, whose cadence and structure resembles an efficient and fast-paced startup, with rapid growth and development opportunities.
US, WA, Seattle
About Sponsored Products and Brands: The Sponsored Products and Brands team at Amazon Ads is re-imagining the advertising landscape through industry leading generative AI technologies, revolutionizing how millions of customers discover products and engage with brands across Amazon.com and beyond. We are at the forefront of re-inventing advertising experiences, bridging human creativity with artificial intelligence to transform every aspect of the advertising lifecycle from ad creation and optimization to performance analysis and customer insights. We are a passionate group of innovators dedicated to developing responsible and intelligent AI technologies that balance the needs of advertisers, enhance the shopping experience, and strengthen the marketplace. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. About Our Team: The Sponsored Brands Impressions-based Offerings team is responsible for evolving the value proposition of Sponsored Brands to drive brand advertising in retail media at scale, helping brands get discovered, acquire new customers and sustainably grow customer lifetime value. We build end-to-end solutions that enable brands to drive discovery, visibility and share of voice. This includes building advertiser controls, shopper experiences, monetization strategies and optimization features. We succeed when (1) shoppers discover, engage and build affinity with brands and (2) brands can grow their business at scale with our advertising products. About This Role: As an Applied Scientist on our team, you will: * Develop AI solutions for Sponsored Brands advertiser and shopper experiences. Build monetization and optimization systems that leverage generative models to value and improve campaign performance. * Define a long-term science vision and roadmap for our Sponsored Brands advertising business, driven from our customers' needs, translating that direction into specific plans for applied scientists and engineering teams. This role combines science leadership, organizational ability, technical strength, product focus, and business understanding. * Design and conduct A/B experiments to evaluate proposed solutions based on in-depth data analyses. * Effectively communicate technical and non-technical ideas with teammates and stakeholders; * Stay up-to-date with advancements and the latest modeling techniques in the field. * Think big about the arc of development of Gen AI over a multi-year horizon and identify new opportunities to apply these technologies to solve real-world problems. #GenAI
US, MA, N.reading
Amazon Industrial Robotics is seeking exceptional talent to help develop the next generation of advanced robotics systems that will transform automation at Amazon's scale. We're building revolutionary robotic systems that combine cutting-edge AI, sophisticated control systems, and advanced mechanical design to create adaptable automation solutions capable of working safely alongside humans in dynamic environments. This is a unique opportunity to shape the future of robotics and automation at an unprecedented scale, working with world-class teams pushing the boundaries of what's possible in robotic dexterous manipulation, locomotion, and human-robot interaction. This role presents an opportunity to shape the future of robotics through innovative applications of deep learning and large language models. At Amazon Industrial Robotics we leverage advanced robotics, machine learning, and artificial intelligence to solve complex operational challenges at an unprecedented scale. Our fleet of robots operates across hundreds of facilities worldwide, working in sophisticated coordination to fulfill our mission of customer excellence. The ideal candidate will contribute to research that bridges the gap between theoretical advancement and practical implementation in robotics. You will be part of a team that's revolutionizing how robots learn, adapt, and interact with their environment. Join us in building the next generation of intelligent robotics systems that will transform the future of automation and human-robot collaboration. Key job responsibilities - Collaborate with simulation and robotics experts to translate physical modeling needs into robust, scalable, and maintainable simulation solutions. - Design and implement high-performance simulation modeling and tools for rigid and deformable body simulation. - Identify and optimize performance bottlenecks in simulation pipelines to support real-time and batch simulation workflows. - Help build validation and unit testing pipelines to ensure correctness and physical fidelity of simulation results. - Identify potential sources of sim-to-real gaps and propose modeling and numerical approximations to reduce them. - Stay current with the latest advances in numerical methods, parallel computing, and GPU architectures, and incorporate them into our tools.
IN, KA, Bengaluru
Amazon Devices is an inventive research and development company that designs and engineer high-profile devices like the Kindle family of products, Fire Tablets, Fire TV, Health Wellness, Amazon Echo & Astro products. This is an exciting opportunity to join Amazon in developing state-of-the-art techniques that bring Gen AI on edge for our consumer products. We are looking for exceptional scientists to join our Applied Science team and help develop the next generation of edge models, and optimize them while doing co-designed with custom ML HW based on a revolutionary architecture. Work hard. Have Fun. Make History. Key job responsibilities Quantize, prune, distill, finetune Gen AI models to optimize for edge platforms Fundamentally understand Amazon’s underlying Neural Edge Engine to invent optimization techniques Analyze deep learning workloads and provide guidance to map them to Amazon’s Neural Edge Engine Use first principles of Information Theory, Scientific Computing, Deep Learning Theory, Non Equilibrium Thermodynamics Train custom Gen AI models that beat SOTA and paves path for developing production models Collaborate closely with compiler engineers, fellow Applied Scientists, Hardware Architects and product teams to build the best ML-centric solutions for our devices Publish in open source and present on Amazon's behalf at key ML conferences - NeurIPS, ICLR, MLSys.
IN, KA, Bengaluru
You will be working with a unique and gifted team developing exciting products for consumers. The team is a multidisciplinary group of engineers and scientists engaged in a fast paced mission to deliver new products. The team faces a challenging task of balancing cost, schedule, and performance requirements. You should be comfortable collaborating in a fast-paced and often uncertain environment, and contributing to innovative solutions, while demonstrating leadership, technical competence, and meticulousness. Your deliverables will include development of thermal solutions, concept design, feature development, product architecture and system validation through to manufacturing release. You will support creative developments through application of analysis and testing of complex electronic assemblies using advanced simulation and experimentation tools and techniques. Key job responsibilities In this role, you will: - Lead end-to-end thermal design for SoC and consumer electronics, spanning package, board, system architecture, and product integration - Perform advanced CFD simulations using tools such as Star-CCM+ or FloEFD to assess feasibility, risks, and mitigation strategies - Plan and execute thermal validation for devices and SoC packages, ensuring compliance with safety, reliability, and qualification requirements - Partner with cross-functional and cross-site teams to influence product decisions, define thermal limits, and establish temperature thresholds - Develop data processing, statistical analysis, and test automation frameworks to improve insight quality, scalability, and engineering efficiency - Communicate thermal risks, trade-offs, and mitigation strategies clearly to engineering leadership to support schedule, performance, and product decisions About the team Amazon Lab126 is an inventive research and development company that designs and engineers high-profile consumer electronics. Lab126 began in 2004 as a subsidiary of Amazon.com, Inc., originally creating the best-selling Kindle family of products. Since then, we have produced innovative devices like Fire tablets, Fire TV and Amazon Echo. What will you help us create?
CA, BC, Vancouver
Success in any organization begins with its people and having a comprehensive understanding of our workforce and how we best utilize their unique skills and experience is paramount to our future success. WISE (Workforce Intelligence powered by Scientific Engineering) delivers the scientific and engineering foundation that powers Amazon's enterprise-wide workforce planning ecosystem. Addressing the critical need for precise workforce planning, WISE enables a closed-loop mechanism essential for ensuring Amazon has the right workforce composition, organizational structure, and geographical footprint to support long-term business needs with a sustainable cost structure. We are looking for a Sr. Applied Scientist to join our ML/AI team to work on Advanced Optimization and LLM solutions. You will partner with Software Engineers, Machine Learning Engineers, Data Engineers and other Scientists, TPMs, Product Managers and Senior Management to help create world-class solutions. We're looking for people who are passionate about innovating on behalf of customers, demonstrate a high degree of product ownership, and want to have fun while they make history. You will leverage your knowledge in machine learning, advanced analytics, metrics, reporting, and analytic tooling/languages to analyze and translate the data into meaningful insights. You will have end-to-end ownership of operational and technical aspects of the insights you are building for the business, and will play an integral role in strategic decision-making. Further, you will build solutions leveraging advanced analytics that enable stakeholders to manage the business and make effective decisions, partner with internal teams to identify process and system improvement opportunities. As a tech expert, you will be an advocate for compelling user experiences and will demonstrate the value of automation and data-driven planning tools in the People Experience and Technology space. Key job responsibilities * Engineering execution - drive crisp and timely execution of milestones, consider and advise on key design and technology trade-offs with engineering teams * Priority management - manage diverse requests and dependencies from teams * Process improvements – define, implement and continuously improve delivery and operational efficiency * Stakeholder management – interface with and influence your stakeholders, balancing business needs vs. technical constraints and driving clarity in ambiguous situations * Operational Excellence – monitor metrics and program health, anticipate and clear blockers, manage escalations To be successful on this journey, you love having high standards for yourself and everyone you work with, and always look for opportunities to make our services better.
RO, Bucharest
Amazon's Compliance and Safety Services (CoSS) Team is looking for a smart and creative Applied Scientist to apply and extend state-of-the-art research in NLP, multi-modal modeling, domain adaptation, continuous learning and large language model to join the Applied Science team. At Amazon, we are working to be the most customer-centric company on earth. Millions of customers trust us to ensure a safe shopping experience. This is an exciting and challenging position to drive research that will shape new ML solutions for product compliance and safety around the globe in order to achieve best-in-class, company-wide standards around product assurance. You will research on large amounts of tabular, textual, and product image data from product detail pages, selling partner details and customer feedback, evaluate state-of-the-art algorithms and frameworks, and develop new algorithms to improve safety and compliance mechanisms. You will partner with engineers, technical program managers and product managers to design new ML solutions implemented across the entire Amazon product catalog. Key job responsibilities As an Applied Scientist on our team, you will: - Research and Evaluate state-of-the-art algorithms in NLP, multi-modal modeling, domain adaptation, continuous learning and large language model. - Design new algorithms that improve on the state-of-the-art to drive business impact, such as synthetic data generation, active learning, grounding LLMs for business use cases - Design and plan collection of new labels and audit mechanisms to develop better approaches that will further improve product assurance and customer trust. - Analyze and convey results to stakeholders and contribute to the research and product roadmap. - Collaborate with other scientists, engineers, product managers, and business teams to creatively solve problems, measure and estimate risks, and constructively critique peer research - Consult with engineering teams to design data and modeling pipelines which successfully interface with new and existing software - Publish research publications at internal and external venues. About the team The science team delivers custom state-of-the-art algorithms for image and document understanding. The team specializes in developing machine learning solutions to advance compliance capabilities. Their research contributions span multiple domains including multi-modal modeling, unstructured data matching, text extraction from visual documents, and anomaly detection, with findings regularly published in academic venues.