def __init__()

in src/speech_reps/featurize.py [0:0]


    def __init__(self, params_file, gpu=None):
        super().__init__() 

        # Load the model
        from .models.decoar import DeCoAR
        self._model = DeCoAR()
        models = torch.load(params_file)['model']
        component_state_dict = OrderedDict()
        for key in models.keys():
            component_state_dict[key] = models[key]
        self._model.load_state_dict(component_state_dict, strict=False)
        self._ctx = gpu
        if self._ctx is not None:
            self._model = self._model.cuda(self._ctx)