def setup_dataloader(self):
    from model.base_feature_extractor import BaseFeatureExtractor
    base_feature_extractor = BaseFeatureExtractor(opts=self.opts)
    base_feature_extractor = base_feature_extractor.to(device=self.device)
    if self.use_multi_gpu:
        base_feature_extractor = torch.nn.DataParallel(base_feature_extractor)
    self.base_feature_extractor = base_feature_extractor
    self.base_feature_extractor.eval()
    if self.base_feature_extractor.training:
        print_warning_message('Base feature extractor is in training mode. Moving to evaluation mode')
        self.base_feature_extractor.eval()
    (train_loader, val_loader, diag_classes, class_weights) = get_data_loader(opts=self.opts)
    self.train_loader = train_loader
    self.val_loader = val_loader
    self.diag_classes = diag_classes
    self.class_weights = torch.from_numpy(class_weights)
def setup_dataloader(self):
    from model.base_feature_extractor import BaseFeatureExtractor
    base_feature_extractor = BaseFeatureExtractor(opts=self.opts)
    base_feature_extractor = base_feature_extractor.to(device=self.device)
    if self.use_multi_gpu:
        base_feature_extractor = torch.nn.DataParallel(base_feature_extractor)
    self.base_feature_extractor = base_feature_extractor
    self.base_feature_extractor.eval()
    if self.base_feature_extractor.training:
        print_warning_message('Base feature extractor is in training mode. Moving to evaluation mode')
        self.base_feature_extractor.eval()
    (train_loader, val_loader, diag_classes, class_weights) = get_data_loader(opts=self.opts)
    self.train_loader = train_loader
    self.val_loader = val_loader
    self.diag_classes = diag_classes
    self.class_weights = torch.from_numpy(class_weights)