Hi, I encounter the following when running your code:
v, , = self.lstm1(feature, feature_len)
RuntimeError: Length of all samples has to be greater than 0, but found an element in 'lengths' that is <= 0
The reason is that the “text_raw_indices” contains all zero list, so that Dynamic_LSTM receive a sequence that all zero.
I use glove.840B.300d embedding, looks like that the trainning data contain sentence that all the words have no corresponding embedding.
However, I didn't encounter this error when just use your code. But when I want to make some changes, this issue sometimes may raise, and other times it works just fine. Can you offer me some help ?
Hi, I encounter the following when running your code:
v, , = self.lstm1(feature, feature_len) RuntimeError: Length of all samples has to be greater than 0, but found an element in 'lengths' that is <= 0
The reason is that the “text_raw_indices” contains all zero list, so that Dynamic_LSTM receive a sequence that all zero.
I use glove.840B.300d embedding, looks like that the trainning data contain sentence that all the words have no corresponding embedding.
However, I didn't encounter this error when just use your code. But when I want to make some changes, this issue sometimes may raise, and other times it works just fine. Can you offer me some help ?
Sincerely, Steve Wang