Skip to content

Should some instance variables be local? #636

Open

Description

@kuraga

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.)

Activity

  1. changed the title [-]Should some instance variable be local?[/-] [+]Should some instance variableы be local?[/+] on Nov 19, 2024
  2. changed the title [-]Should some instance variableы be local?[/-] [+]Should some instance variables be local?[/+] on Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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