8000 Padding mask indices error · Issue #15 · ajhalthor/Transformer-Neural-Network · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Padding mask indices error #15
Open
@GoroYeh56

Description

@GoroYeh56

Hi,

From what I drew, I believe the code create_mask() should correct the padding indices.

Image

From

      eng_chars_to_padding_mask = np.arange(eng_sentence_length + 1, max_sequence_length)
      kn_chars_to_padding_mask = np.arange(kn_sentence_length + 1, max_sequence_length)

to

      eng_chars_to_padding_mask = np.arange(eng_sentence_length, max_sequence_length)
      kn_chars_to_padding_mask = np.arange(kn_sentence_length , max_sequence_length)

Since np.arange generate a sequence from [start, end).
Correct me if I'm wrong, thank you!

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

      0