Comments (4)
@astonzhang @smolix @AnirudhDagar @archersama
from d2l-en.
Thanks. The idea is very good and the workaround of breaking a class def into multiple cells may address our earlier concerns. One thing we need to think carefully is the design of the Trainer
base class, such as its fit
method: D2L has many different use cases such as sequence to sequence and object detection.
from d2l-en.
As @astonzhang suggested, I have the same concerns with the design of the Trainer
base class fit
method which needs to handle various scenarios.
Other than that, type hints will surely be a great addition for type checking using mypy and it also adds to the readability of the code, making it more understandable. We should definitely add it to the key APIs.
Also fstrings
in python3
again help the print statements be more readable and concise, so there is no reason not to go ahead with refactoring these.
The idea of keeping all the framework implementations in a single library looks good, but this will make things a bit more complex in terms of mantainence of the single framework with multiple dependencies. This is a design choice which we should discuss in detail.
Yes, the API redesign, will definitely look good for the mini framework-agnostic library that d2l can become. But, we do not want to over-design things and somehow end up with complex APIs. This may also hinder the understanding of DL concepts along with code for people who are just starting and are very new to the world of Deep Learning.
from d2l-en.
we can have multiple version of Trainer
, for example, the basic CPU trainer BasicTrainer
, the multi-gpu trainer Trainer
, and others. The idea is to reuse codes.
We don't need to have a single trainer to support every framework, but make them as similar as possible. I'm thinking about have all codes in the d2l
module, then
from d2l import mxnet as d2l # for mxnet implementations
from d2l import torch as d2l # for pytorch implementations
from d2l import tensorflow as d2l # for tensorflow implementations
from d2l-en.
Related Issues (20)
- pip install d2l==1.0.0b0 Fails to Install on Linux Mint/Ubuntu 22.04 HOT 1
- about GPT server HOT 1
- Use of deprecated torch.norm HOT 3
- 2.4.3 transpose confusion ∇x (Ax) = A^T
- Japanese translation
- Up to date ipynb notebooks and pdf versions HOT 2
- Notebooks are not working on Colab HOT 3
- AttributeError: module 'd2l.torch' has no attribute 'train_ch3' HOT 5
- module 'd2l.torch' has no attribute 'count_corpus' HOT 3
- A question about 4.7.3.3. Label Shift Correction HOT 1
- PyTorch Colab of Chapter 13.5 is having an IndexError HOT 2
- Free copy for the first 100 contributors
- Ethics?
- MLX support HOT 1
- Add type hinting to functions HOT 1
- Incorrect Use of torch.no_grad() in fit_epoch Method in d2l/torch.py::Trainer::fit_epoch HOT 2
- Not able to render :begin_tab:toc
- Errors in train_ch3 in tensorflow version softmax-regression-scratch.ipynb HOT 1
- [**emergency**] the comment block is down, please fix it right now HOT 1
- Chinese version of the code is out of date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d2l-en.