def test_fn(model): top1, top5, losses = classifier.test(eval_data_loader, model, cc.criterion, [cc.tflogger, cc.pylogger], None, args) # pdb.set_trace() return top1, top5, losses
def eval_fn(model): if memoized_data_loader: loss = 0 for images, targets in memoized_data_loader: outputs = model(images) loss += criterion(outputs, targets).item() loss = loss / len(memoized_data_loader) else: _, _, loss = classifier.test(eval_data_loader, model, criterion, loggers, None, args) return loss
def calib_eval_fn(model): classifier.test(calib_data_loader, model, cc.criterion, [], None, args)
def test_fn(model): top1, top5, loss = classifier.test(test_data_loader, model, criterion, loggers, None, args) return OrderedDict([('top-1', top1), ('top-5', top5), ('loss', loss)])
def test_fn(model): return classifier.test(test_data_loader, model, cc.criterion, [cc.tflogger, cc.pylogger], None, args)