b30cdf3a1a977927345f407a4c25be2884cfee7f,scripts/segmentation/train.py,Trainer,validation,#Trainer#Any#,156
Before Change
save_checkpoint(self.net.module, self.args, False)
def validation(self, epoch):
total_inter, total_union, total_correct, total_label = 0, 0, 0, 0
tbar = tqdm(self.eval_data)
for i, (data, target) in enumerate(tbar):
outputs = self.evaluator(data, target)
for (correct, labeled, inter, union) in outputs:
total_correct += correct
total_label += labeled
total_inter += inter
total_union += union
pixAcc = 1.0 * total_correct / (np.spacing(1) + total_label)
IoU = 1.0 * total_inter / (np.spacing(1) + total_union)
mIoU = IoU.mean()
tbar.set_description("Epoch %d, validation pixAcc: %.3f, mIoU: %.3f"%\
(epoch, pixAcc, mIoU))
After Change
tbar = tqdm(self.eval_data)
for i, (data, target) in enumerate(tbar):
outputs = self.evaluator(data.astype(args.dtype, copy=False))
outputs = [x[0] for x in outputs]
targets = mx.gluon.utils.split_and_load(target, args.ctx)
self.metric.update(targets, outputs)
pixAcc, mIoU = self.metric.get()
tbar.set_description("Epoch %d, validation pixAcc: %.3f, mIoU: %.3f"%\
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: dmlc/gluon-cv
Commit Name: b30cdf3a1a977927345f407a4c25be2884cfee7f
Time: 2018-09-06
Author: 8041160+zhanghang1989@users.noreply.github.com
File Name: scripts/segmentation/train.py
Class Name: Trainer
Method Name: validation
Project Name: google/deepvariant
Commit Name: 3250fae3d34f3b14d6afe1b7f87daa98c7df3ed6
Time: 2020-06-17
Author: marianattestad@google.com
File Name: deeptrio/make_examples.py
Class Name: RegionProcessor
Method Name: create_pileup_examples
Project Name: GPflow/GPflow
Commit Name: bd1e9c04b48dd5ccca9619d5eaa2595a358bdb08
Time: 2020-01-31
Author: st--@users.noreply.github.com
File Name: gpflow/kernels/statics.py
Class Name: White
Method Name: K