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

Should some instance variables be local? #636

Open
kuraga opened this issue Sep 16, 2024 · 0 comments
Open

Should some instance variables be local? #636

kuraga opened this issue Sep 16, 2024 · 0 comments

Comments

@kuraga
Copy link

kuraga commented Sep 16, 2024

There are in Decoder:

  • .memory,
  • .processed_memory,
  • .mask.

And,

  • Each is set in .initialize_decoder_states() (called from .forward() and .inference(), unconditionally).
  • Noone is re-assigned.
  • Each is used in .decode() only.

Should they be arguments of .decode()?

(If so, mask has to be added to .forward()/.inference(). memory is already there. processed_memory is produced from the latter.)

@kuraga kuraga changed the title Should some instance variable be local? Should some instance variableы be local? Nov 19, 2024
@kuraga kuraga changed the title Should some instance variableы be local? Should some instance variables be local? Nov 19, 2024
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