9a8d91022cfde0a380d8700be76d6ddbd716a2af,robosat/tools/train.py,,validate,#,156

Before Change



        for mask, output in zip(masks, outputs):
            mask = mask.data.cpu().numpy()
            prediction = output.data.max(0)[1].cpu().numpy()
            iou.add(mask.ravel(), prediction.ravel())

    assert num_samples > 0, "dataset contains validation images and labels"

    return {"loss": running_loss / num_samples, "iou": iou.get()}

After Change


        running_loss += loss.item()

        for mask, output in zip(masks, outputs):
            iou.add(mask.float(), output.max(0)[1].float())

    assert num_samples > 0, "dataset contains validation images and labels"

    return {"loss": running_loss / num_samples, "iou": iou.get()}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: mapbox/robosat
Commit Name: 9a8d91022cfde0a380d8700be76d6ddbd716a2af
Time: 2018-09-12
Author: o@courtin.co
File Name: robosat/tools/train.py
Class Name:
Method Name: validate


Project Name: mapbox/robosat
Commit Name: 4a486c33d7faa7938355658abca7e936022389b0
Time: 2018-10-02
Author: o@courtin.co
File Name: robosat/tools/train.py
Class Name:
Method Name: validate


Project Name: mapbox/robosat
Commit Name: 4a486c33d7faa7938355658abca7e936022389b0
Time: 2018-10-02
Author: o@courtin.co
File Name: robosat/tools/train.py
Class Name:
Method Name: train


Project Name: mapbox/robosat
Commit Name: 9a8d91022cfde0a380d8700be76d6ddbd716a2af
Time: 2018-09-12
Author: o@courtin.co
File Name: robosat/tools/train.py
Class Name:
Method Name: train