def METHOD_NAME(self, cfg_file, devices):
    model = get_detector_cfg(cfg_file)
    # backbone convert to ResNet18
    model.backbone.depth = 18
    model.neck.in_channels = [64, 128, 256, 512]
    model.backbone.init_cfg = None
    from mmdet.registry import MODELS
    assert all([device in ['cpu', 'cuda'] for device in devices])
    for device in devices:
        detector = MODELS.build(model)
        if device == 'cuda':
            if not torch.cuda.is_available():
                return unittest.skip('test requires GPU and torch+cuda')
            detector = detector.cuda()
        packed_inputs = demo_mm_inputs(2, [[3, 128, 128], [3, 125, 130]])
        data = detector.data_preprocessor(packed_inputs, False)
        batch_results = detector.forward(**data, mode='tensor')
        self.assertIsInstance(batch_results, tuple)