    def get_parameters(self):
        """
        Obtain the weights.
        """
        parameters = {
            name: w.contiguous().cuda().half()
            for name, w in torch.load(self.cfg.MODEL.WEIGHTS).items()
        }
        for name, param in self.model._params.items():
            parameters[name] = torch.from_numpy(param).cuda().half()
        return parameters
Obtain the weights.
examples/02_detectron2/predictor/predictor.py