Skip to content

Ex 2: model files and forward signature #70

Discussion options

You must be logged in to vote

Hi, I understand you confusion! The structure of query['tokens']['tokens'] is due how the IrTripleDatasetReader and the IrTupleDatasetReader (in data_loading.py) read in the textfields for the query_tokens, doc_pos_tokens and doc_neg_tokens. For each of the query, doc_pos, doc_neg it reads in a TextField (https://docs.allennlp.org/main/api/data/fields/text_field/) which is defined as TextFieldTensors = Dict[str, Dict[str, torch.Tensor]].

The given structure is correct and works with the predefined dataloaders, so in order to complete the missing parts, I would advise you to load a small example of data and look at the structure how it is read in.

Does that answer your question?

Best,
Sophia

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@waffelbaellchen
Comment options

Answer selected by waffelbaellchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants