9a8d91022cfde0a380d8700be76d6ddbd716a2af,robosat/tools/train.py,,train,#Any#Any#Any#Any#Any#Any#,116
Before Change
running_loss += loss.item()
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
running_loss += loss.item()
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"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: IBM/adversarial-robustness-toolbox
Commit Name: 81542a8492f96a8bc9fbdc96c59c5291b19e103f
Time: 2018-09-13
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: loss_gradient
Project Name: leftthomas/SRGAN
Commit Name: 1433d4c435a253e891009b08a9280bc452087db0
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: test.py
Class Name:
Method Name: