Skip to content

AttributeError: 'GPT2Wrapper' object has no attribute 'model' #14

@suparklingmin

Description

@suparklingmin

max_length = min(self.model._model.config.max_position_embeddings, max_length + input_length)

Hello, I tried to generate single text and encountered the following error.

  File "/home/myname/dino/modeling.py", line 275, in generate_self_debiasing
    max_length = min(self.model._model.config.max_position_embeddings, max_length + input_length)
AttributeError: 'GPT2Wrapper' object has no attribute 'model'

I replaced self.model._model with self._model, which solved the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions