@classmethod
def load(cls, load_path, env=None, custom_objects=None, **kwargs):
    """
        Load the model from file

        :param load_path: (str or file-like) the saved parameter location
        :param env: (Gym Environment) the new environment to run the loaded model on
            (can be None if you only need prediction from a trained model)
        :param custom_objects: (dict) Dictionary of objects to replace
            upon loading. If a variable is present in this dictionary as a
            key, it will not be deserialized and the corresponding item
            will be used instead. Similar to custom_objects in
            `keras.models.load_model`. Useful when you have an object in
            file that can not be deserialized.
        :param kwargs: extra arguments to change the model when loading
        """
    data, params = cls._load_from_file(load_path, custom_objects=custom_objects
        )
    if 'policy_kwargs' in kwargs and kwargs['policy_kwargs'] != data[
        'policy_kwargs']:
        raise ValueError(
            'The specified policy kwargs do not equal the stored policy kwargs. Stored kwargs: {}, specified kwargs: {}'
            .format(data['policy_kwargs'], kwargs['policy_kwargs']))
    model = cls(policy=data['policy'], env=None, _init_setup_model=False)
    model.__dict__.update(data)
    model.__dict__.update(kwargs)
    model.set_env(env)
    model.setup_model()
    model.load_parameters(params)
    return model
