Hi,
I'm trying to implement a many to one model using the AttentionSeq2Seq model.
I want to classify each sentence in my corpus with a category.
Each sentence has a different number of tokens
I will explain briefly my workflow.
I have a vocabulary of size N to create a one hot. For each sentence of length K I have a numpy matrix of size KxN.
I have two doubts:
Suppose I want to use the keras' method fit_generator(): How can I can concatenate such matrices to obtain a batch of size L?
In the snippet below, which is the correct value for input_length?
input_dim = len(source_vocab.keys())
output_dim = len(target_vocab.keys())
input_length = input_length # this boy here
output_length = 1
model = seq2seq.AttentionSeq2Seq(input_dim=input_dim,
hidden_dim=hidden_dim,
input_length=input_length,
output_length=output_length,
output_dim=output_dim,
depth=depth,
bidirectional=bidirectional)
Hi, I'm trying to implement a many to one model using the AttentionSeq2Seq model. I want to classify each sentence in my corpus with a category.
Each sentence has a different number of tokens I will explain briefly my workflow. I have a vocabulary of size N to create a one hot. For each sentence of length K I have a numpy matrix of size KxN.
I have two doubts:
Thanks!