NeMo icon indicating copy to clipboard operation
NeMo copied to clipboard

Fixed in_features dim if bidirectional is True

Open farisalasmary opened this issue 3 years ago • 2 comments

Signed-off-by: Faris Abdullah Alasmary [email protected]

What does this PR do ?

Fix a bug in LSTM decoder while using bidirectional LSTM

Collection: ASR

Changelog

  • Adding one line of code to check if the argument bidirectional is True and multiply lstm_hidden_size by 2 since the output vector of both directions have the same size and they are concatenated to form the final output of the LSTM model.

Usage

N/A

Before your PR is "Ready for review"

Pre checks:

  • [x] Make sure you read and followed Contributor guidelines
  • [ ] Did you write any new necessary tests?
  • [ ] Did you add or update any necessary documentation?
  • [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • [ ] Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • [ ] New Feature
  • [x] Bugfix
  • [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed. Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

farisalasmary avatar Jul 22 '22 23:07 farisalasmary

@titu1994

farisalasmary avatar Jul 22 '22 23:07 farisalasmary

@VahidooX for review. It does seem correct, but I dunno if we have pretrained models that won't work with this.

titu1994 avatar Jul 22 '22 23:07 titu1994