Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CityscapeSOTA] Fix an evaluation bug #1481

Merged
merged 2 commits into from
Nov 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion contrib/CityscapesSOTA/scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def train(model,
if (iter % save_interval == 0
or iter == iters) and (val_dataset is not None):
num_workers = 1 if num_workers > 0 else 0
mean_iou, acc = evaluate(
metircs = evaluate(
model,
val_dataset,
aug_eval=aug_eval,
Expand All @@ -218,6 +218,7 @@ def train(model,
stride=None,
crop_size=None,
num_workers=num_workers)
mean_iou, acc = metircs[0], metrics[1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样兼容性更好,避免以后paddleseg新增其他metric引发异常

model.train()

if (iter % save_interval == 0 or iter == iters) and local_rank == 0:
Expand Down