def evaluate_split(self, split):
    if (len(self.gpus) >= 2):
        self._forward_once_for_flops(self.model)
    assert (split in {'train', 'test'})
    if (split == 'test'):
        queue = self.valid_queue
    else:
        queue = self.train_queue
    (acc, obj, perfs) = self.infer_epoch(queue, self.parallel_model, self._criterion, self.device)
    self.logger.info('acc %f ; obj %f ; performance: %s', acc, obj, '; '.join(['{}: {:.3f}'.format(n, v) for (n, v) in perfs.items()]))
    return (acc, obj)
def evaluate_split(self, split):
    if (len(self.gpus) >= 2):
        self._forward_once_for_flops(self.model)
    assert (split in {'train', 'test'})
    if (split == 'test'):
        queue = self.valid_queue
    else:
        queue = self.train_queue
    (acc, obj, perfs) = self.infer_epoch(queue, self.parallel_model, self._criterion, self.device)
    self.logger.info('acc %f ; obj %f ; performance: %s', acc, obj, '; '.join(['{}: {:.3f}'.format(n, v) for (n, v) in perfs.items()]))
    return (acc, obj)