Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jiapingW opened this issue Jan 15, 2025 · 0 comments
Open

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

jiapingW opened this issue Jan 15, 2025 · 0 comments

Comments

@jiapingW
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant