D2l

Latest version: v1.0.3

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.0

The following chapters have been significantly improved for v1.0:

* Linear Neural Networks
* Multilayer Perceptrons
* Deep Learning Computation
* Convolutional Neural Networks
* Modern Convolutional Neural Networks
* Recurrent Neural Networks

Finalized chapters are being translated into Chinese ([d2l-zh v2](https://github.com/d2l-ai/d2l-zh/tree/v2))


Other Improvements

* Fixed issues of not showing all the equation numbers in the HTML and PDF
* Consistently used f-string
* Revised overfitting experiments
* Fixed implementation errors for weight decay experiments
* Improved layer index style
* Revised "breaking the symmetry"
* Revised descriptions of covariate and label shift
* Fixed mathematical errors in covariate shift correction
* Added true risk, empirical risk, and (weighted) empirical risk minimization
* Improved variable naming style for matrices and tensors
* Improved consistency of mathematical notation for tensors of order two or higher
* Improved mathematical descriptions of convolution
* Revised descriptions of cross-correlation
* Added feature maps and receptive fields
* Revised mathematical descriptions of batch normalization
* Added more details to Markov models
* Fixed implementations of k-step-ahead predictions in sequence modeling
* Fixed mathematical descriptions in language modeling
* Improved the `d2l.Vocab` API
* Fixed mathematical descriptions and figure illustrations for deep RNNs
* Added BLEU
* Improved machine translation application results
* Improved the animation plot function in the all the training loops

1.0.0

1.0.0rc0

The physical book will be published soon.

Thanks to Our Contributors
=================
alxnorden, avinashingit, bowen0701, brettkoonce, Chaitanya Prakash Bapat, cryptonaut, Davide Fiocco, edgarroman, gkutiel, John Mitro, Liang Pu, Rahul Agarwal, mohamed-ali, mstewart141, Mike Müller, NRauschmayr, Prakhar Srivastav, sad-, sfermigier, Sheng Zha, sundeepteki, topecongiro, tpdi, vermicelli, Vishaal Kapoor, vishwesh5, YaYaB

1.0.0beta0

D2L has gone 1.0.0-beta0! We thank all the [296 contributors](https://d2l.ai/chapter_preface/index.html#acknowledgments) for making this happen!

Forthcoming on Cambridge University Press

Chapter 1--11 will be forthcoming on Cambridge University Press (early 2023).
![1a](https://user-images.githubusercontent.com/22279212/207738895-5b1196e1-dded-4d92-a271-d83fe101f4f0.png)


New JAX Implementation

We added new JAX implementation. Get started with `import jax` at https://d2l.ai/chapter_preliminaries/ndarray.html

![2a](https://user-images.githubusercontent.com/22279212/207738660-c84146f5-f3ae-4856-8ffe-f38d8bb99580.png)

Thank AnirudhDagar!


New Vol.2 Chapter on Reinforcement Learning

With the advent of ChatGPT (sibling model to InstructGPT fine-tuned using reinforcement learning), you may get curious about how to enable ML to take decisions sequentially:

[17. Reinforcement Learning](https://d2l.ai/chapter_reinforcement-learning/index.html)
[17.1. Markov Decision Process (MDP)](https://d2l.ai/chapter_reinforcement-learning/mdp.html)
[17.2. Value Iteration](https://d2l.ai/chapter_reinforcement-learning/value-iter.html)
[17.3. Q-Learning](https://d2l.ai/chapter_reinforcement-learning/qlearning.html)

![3a](https://user-images.githubusercontent.com/22279212/207739332-2d00c290-7f9a-4535-98f7-68547709b120.png)
![3b](https://user-images.githubusercontent.com/22279212/207739348-66ebed91-f6c9-4f9b-8557-b58477a9e8f7.png)

Thank Pratik Chaudhari (University of Pennsylvania and Amazon), Rasool Fakoor rasoolfa (Amazon), and Kavosh Asadi (Amazon)!

New Vol.2 Chapter on Gaussian Processes

“Everything is a special case of a Gaussian process.” Gaussian processes and deep neural networks are highly complementary and can be combined to great effect:

[18. Gaussian Processes](https://d2l.ai/chapter_gaussian-processes/index.html)
[18.1. Introduction to Gaussian Processes](https://d2l.ai/chapter_gaussian-processes/gp-intro.html)
[18.2. Gaussian Process Priors](https://d2l.ai/chapter_gaussian-processes/gp-priors.html)
[18.3. Gaussian Process Inference](https://d2l.ai/chapter_gaussian-processes/gp-inference.html)

![4a](https://user-images.githubusercontent.com/22279212/207739613-830e1df0-62f2-479f-8583-224ff26be1ae.png)
![4b](https://user-images.githubusercontent.com/22279212/207739619-d2aa16d7-2e3e-45bf-ae6e-27bc5c79b848.png)

Thank Andrew Gordon Wilson andrewgordonwilson (New York University and Amazon)!

New Vol.2 Chapter on Hyperparameter Optimization

Tired of setting hyperparameters in a trial-and-error manner? You may wish to check out the systematic hyperparameter optimization approach:

[19. Hyperparameter Optimization](https://d2l.ai/chapter_hyperparameter-optimization/index.html)
[19.1. What Is Hyperparameter Optimization?](https://d2l.ai/chapter_hyperparameter-optimization/hyperopt-intro.html)
[19.2. Hyperparameter Optimization API](https://d2l.ai/chapter_hyperparameter-optimization/hyperopt-api.html)
[19.3. Asynchronous Random Search](https://d2l.ai/chapter_hyperparameter-optimization/rs-async.html)
[19.4. Multi-Fidelity Hyperparameter Optimization](https://d2l.ai/chapter_hyperparameter-optimization/sh-intro.html)
[19.5. Asynchronous Successive Halving](https://d2l.ai/chapter_hyperparameter-optimization/sh-async.html)

![5b](https://user-images.githubusercontent.com/22279212/207739634-5a777b41-b84c-4d0a-a86b-22028d906f14.png)

Thank Aaron Klein aaronkl (Amazon), Matthias Seeger mseeger (Amazon), and Cedric Archambeau (Amazon)!

Fixes and Improvements

Thank finale80 JojiJoseph gab-chen Excelsior7 shanmo kxxt vBarbaros gui-miotto bolded atishaygarg tuelwer gopalakrishna-r qingfengtommy Mohamad-Jaallouk biswajitsahoo1111 315930399 for improving this book!

1.0.0alpha1.post0

We are happy to release D2L 1.0.0-alpha1.post0 We thank all the [contributors](https://d2l.ai/chapter_preface/index.html#acknowledgments) who have made this open-source textbook better for everyone.

This minor release includes the following updates:

* Build PDFs using Cambridge Latex Style (2187)
* Feat: Add dynamic preview/stable version tab (2264)
* Chapter Modern RNN is heavily improved, refactoring the text and reorganizing content (2241)
* Chapter Modern CNN is refactored and is more polished (2249)
* Bump supported version to Python3.9 (2231)

It also comes with the following bug-fixes:

* Fix 2250: Depend on matplotlib-inline instead of ipython to avoid colab warning (2279)
* Fix broken preview version pdf links (2264)
* Fix 2247: Tensorflow explicitly squeeze image to support matplotlib<3.3.0 (2248)
* Fix PyTorch moving average computation for batch norm (2213)
* Fix PyTorch module types (LazyLinear -> Linear) (2225)
* Fix QR code being overridden by the section rule issue (2251)
* Fix torch.meshgrid user warning (7d921558a8cb063af05c6246b0aa8cbb2fe9d222)

1.0.0alpha0

We are excited to announce the release of D2L 1.0.0-alpha0! We thank all the [265 contributors](https://d2l.ai/chapter_preface/index.html#acknowledgments) who have made this open-source textbook better for everyone.

New Topics and Revision

We have added the following new topics, with discussions of more recent methods such as ResNeXt, RegNet, ConvNeXt, Vision Transformer, Swin Transformer, T5, GPT-1/2/3, zero-shot, one-shot, few-shot, Gato, Imagen, Minerva, and Parti.

* [Object-Oriented Design for Implementation](https://d2l.ai/chapter_linear-regression/oo-design.html)
* [Synthetic Regression Data](https://d2l.ai/chapter_linear-regression/synthetic-regression-data.html)
* [Generalization](https://d2l.ai/chapter_linear-regression/generalization.html)
* [The Base Classification Model](https://d2l.ai/chapter_linear-classification/classification.html)
* [Generalization in Classification](https://d2l.ai/chapter_linear-classification/generalization-classification.html)
* [Generalization in Deep Learning](https://d2l.ai/chapter_multilayer-perceptrons/generalization-deep.html)
* [ResNeXt](https://d2l.ai/chapter_convolutional-modern/resnet.html)
* [Designing Convolution Network Architectures](https://d2l.ai/chapter_convolutional-modern/cnn-design.html)
* [Transformers for Vision](https://d2l.ai/chapter_attention-mechanisms-and-transformers/vision-transformer.html)
* [Large-Scale Pretraining with Transformers](https://d2l.ai/chapter_attention-mechanisms-and-transformers/large-pretraining-transformers.html)

Besides new topics, we have significantly revised all the topics up to transformers. For example, the previous *Linear Neural Networks* and *Multilayer Perceptrons* chapters have been revamped as new chapters of *Linear Neural Networks for Regression*, *Linear Neural Networks for Classification*, and *Multilayer Perceptrons*.

New API

Throughout the book we repeatedly walk through various components including the data, the model, the loss function, and the optimization algorithm. Treating components in deep learning as objects, we can define classes for these objects and their interactions. This object-oriented design for implementation will greatly streamline the presentation. Therefore, inspired by open-source libraries such as [PyTorch Lightning](https://www.pytorchlightning.ai/), we have re-designed the API with three core classes:

* `Module` contains models, losses, and optimization methods;
* `DataModule` provides data loaders for training and validation;
* Both classes are combined using the `Trainer` class, which allows us to train models on a variety of hardware platforms.

For example, with the classic API in previous releases:


model = Multilayer perceptron definition
train_iter, test_iter = d2l.load_data_fashion_mnist(batch_size=256)
loss = nn.CrossEntropyLoss(reduction='none')
trainer = torch.optim.SGD(net.parameters(), lr=0.1)
d2l.train_ch3(model, train_iter, test_iter, loss, num_epochs=10, trainer)


With the new API:


model = Multilayer perceptron definition
data = d2l.FashionMNIST(batch_size=256)
trainer = d2l.Trainer(max_epochs=10)
trainer.fit(model, data)


Lazy Layers in PyTorch

Since v1.8.0, PyTorch offers "lazy" layers where input shape specification is no longer required. For simplicity we will use "lazy" layers whenever we can, such as:


class LinearRegression(d2l.Module):
def __init__(self, lr):
super().__init__()
self.save_hyperparameters()
self.net = nn.LazyLinear(1) Lazy layer with output dimension only
self.net.weight.data.normal_(0, 0.01)
self.net.bias.data.fill_(0)



Ongoing Translations

Join [us](https://github.com/d2l-ai) to improve ongoing translations in:

* [Chinese](https://zh.d2l.ai/) ([Git repo](https://github.com/d2l-ai/d2l-zh))
* [Portuguese](https://pt.d2l.ai/) ([Git repo](https://github.com/d2l-ai/d2l-pt))
* [Turkish](https://tr.d2l.ai/) ([Git repo](https://github.com/d2l-ai/d2l-tr))
* [Vietnamese](https://d2l.aivivn.com/) ([Git repo](https://github.com/d2l-ai/d2l-vi))
* [Korean](https://ko.d2l.ai/) ([Git repo](https://github.com/d2l-ai/d2l-ko))
* [Japanese](https://ja.d2l.ai/) ([Git repo](https://github.com/d2l-ai/d2l-ja))

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.