mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-16 14:41:53 +00:00
[hotfix] set return_outputs=False in examples and polish code (#5404)
* fix: simplify merge_batch * fix: use return_outputs=False to eliminate extra memory consumption * feat: add return_outputs warning * style: remove `return_outputs=False` as it is the default value
This commit is contained in:
@@ -271,7 +271,7 @@ However, if pipeline parallel is enabled, there are several usages different fro
|
||||
3. Do forward and backward passing through calling `Booster.execute_pipeline` method:
|
||||
```python
|
||||
outputs = booster.execute_pipeline(
|
||||
train_dataloader_iter, model, _criterion, optimizer, return_loss=True, return_outputs=True
|
||||
train_dataloader_iter, model, _criterion, optimizer, return_loss=True
|
||||
)
|
||||
```
|
||||
Backward passing has been completed by this method, so there is no need to call `loss.backward()` after executing this method.
|
||||
|
||||
Reference in New Issue
Block a user