d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
23.35k stars 4.29k forks source link

Update oo-design.md #2596

Open gui1223 opened 5 months ago

gui1223 commented 5 months ago

I noticed a potential typo in the code. It seems like 'Neural network is defined' should be changed to 'Neural network is not defined'.

In the module class: def forward(self, X): assert hasattr(self, 'net'), 'Neural network is defined' return self.net(X)