9a8d91022cfde0a380d8700be76d6ddbd716a2af,robosat/tools/train.py,,validate,#Any#Any#Any#Any#Any#,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()}
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: nipy/dipy
Commit Name: 7f10447d742e5eb04aa6ef7d8a6f722828b6d68c
Time: 2013-07-27
Author: garyfallidis@gmail.com
File Name: doc/examples/reconst_csa.py
Class Name:
Method Name:
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