From e62b8d1fc5c938644fc7f42b9785ae581042baff Mon Sep 17 00:00:00 2001 From: Yishuo Wang Date: Thu, 18 Aug 2022 10:57:52 +0800 Subject: [PATCH] Automatically unwrap attributes access of _LiteModule (#5392) * automatically unwrap attributes access of _LiteModule and add test for it * delete redundant documents --- docs/readthedocs/source/doc/Nano/QuickStart/pytorch_nano.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/readthedocs/source/doc/Nano/QuickStart/pytorch_nano.md b/docs/readthedocs/source/doc/Nano/QuickStart/pytorch_nano.md index b26b6725..613c9dc5 100644 --- a/docs/readthedocs/source/doc/Nano/QuickStart/pytorch_nano.md +++ b/docs/readthedocs/source/doc/Nano/QuickStart/pytorch_nano.md @@ -111,7 +111,6 @@ We only need the following steps: - copy all lines of code into the `train` method of `MyNano` - add one line to setup model, optimizer and dataloader - replace the `loss.backward()` with `self.backward(loss)` -- (**optional, only required when you use custom fields or methods of the model**) after calling `self.setup`, the returned model is a wrapper module around the original one which only has some common methods, such as `train`, `forward`, etc. if you need to access other fields or methods of the original model, you can replace the `model.xxxx` with `model.module.xxxx` ```python import os