Skip to content

Commit cf34212

Browse files
authored
Apply suggestions from code review
1 parent d05a893 commit cf34212

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/contrib/detection/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ In this example, we show how to use _Ignite_ to train a image detection model wi
1414
- [aim](https://github.com/aimhubio/aim): `pip install aim`
1515
- [albumentations](https://github.com/albumentations-team/albumentations): `pip install albumentations`
1616
- [pycocotools](https://cocodataset.org/): `pip install pycocotools`
17+
- [python-fire](https://google.github.io/python-fire/guide/): `pip install fire`
1718

1819
Alternatively, install the all requirements using `pip install -r requirements.txt`.
1920

examples/contrib/detection/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def update_model(engine, batch):
161161
scaler.update()
162162

163163
loss_items = {k: v.item() for k, v in loss_dict.items()}
164-
loss_items["loss_average"] = loss.item() / 4
164+
loss_items["loss_average"] = loss.item() / len(loss_dict)
165165

166166
return loss_items
167167

0 commit comments

Comments
 (0)