Skip to content

Using ELMo with TorchText #7

@susantiyuni

Description

@susantiyuni

Hi Keita, thanks for the tutorial. I have one question, though.
Assume this is a sentiment analysis task, and suppose I already have ELMo representation for every sentence in the shape (seq_len, elmo_dimension).
I want to either:

  1. concat this representation with the embedding from embedding layer or,
  2. use this representation before passing it to RNN/CNN.

Do you have any idea on how to use this with Torchtext? I am not sure how to add the elmo sentence representation to the batch and pass it to my model together with the input (which has been converted to indices) ?

Any advice/pointer would be greatly appreciated.

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