Docs partial mdformat improvements (#7378)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2024-01-07 17:13:42 +01:00 committed by GitHub
parent ed73c0fedc
commit bb1326a8ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 231 additions and 261 deletions

View file

@ -21,8 +21,8 @@ Both the Ultralytics YOLO command-line and Python interfaces are simply a high-l
BaseTrainer contains the generic boilerplate training routine. It can be customized for any task based over overriding the required functions or operations as long the as correct formats are followed. For example, you can support your own custom model and dataloader by just overriding these functions:
* `get_model(cfg, weights)` - The function that builds the model to be trained
* `get_dataloader()` - The function that builds the dataloader More details and source code can be found in [`BaseTrainer` Reference](../reference/engine/trainer.md)
- `get_model(cfg, weights)` - The function that builds the model to be trained
- `get_dataloader()` - The function that builds the dataloader More details and source code can be found in [`BaseTrainer` Reference](../reference/engine/trainer.md)
## DetectionTrainer
@ -55,9 +55,8 @@ trainer.train()
You now realize that you need to customize the trainer further to:
* Customize the `loss function`.
* Add `callback` that uploads model to your Google Drive after every 10 `epochs`
Here's how you can do it:
- Customize the `loss function`.
- Add `callback` that uploads model to your Google Drive after every 10 `epochs` Here's how you can do it:
```python
from ultralytics.models.yolo.detect import DetectionTrainer
@ -89,5 +88,4 @@ To know more about Callback triggering events and entry point, checkout our [Cal
## Other engine components
There are other components that can be customized similarly like `Validators` and `Predictors`
See Reference section for more information on these.
There are other components that can be customized similarly like `Validators` and `Predictors`. See Reference section for more information on these.