Skip to content

AttributeError: 'Tensor' object has no attribute 'mask_mod'Β #219

@jiapingW

Description

@jiapingW

Line 100 of generate.py file of main branch. The model_forward function is called here, but there are only 3 parameters, namely model, x, input_pos, without mask. Then the model_forward function will execute model(x,input_pos). In model.py, the first parameter of Transformer forward function is mask, and the next two parameters are idx and input_pos. One parameter is missing here. How should I modify it here or is there any other version of the code that is correct?

generate.py line:118

image

generate.py line:100

image

model.py line:149

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions