9a8d91022cfde0a380d8700be76d6ddbd716a2af,robosat/tools/train.py,,train,#,116
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 training images and labels"
After Change
for mask, output in zip(masks, outputs):
prediction = output.detach()
prediction.requires_grad = False
iou.add(mask.float(), prediction.max(0)[1].float())
assert num_samples > 0, "dataset contains training images and labels"
return {"loss": running_loss / num_samples, "iou": iou.get()}
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: 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: validate
Project Name: lovit/soynlp
Commit Name: bf03e74b9b0858f2e827e6da4b0ca8d960b3b5b6
Time: 2018-11-13
Author: soy.lovit@gmail.com
File Name: soynlp/pos/_news_pos.py
Class Name: NewsPOSExtractor
Method Name: _extract_compound_nouns