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
24.07k stars 4.38k forks source link

Update oo-design.md #2596

Open gui1223 opened 7 months ago

gui1223 commented 7 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)