SLAHAN
SLAHAN copied to clipboard
Errors are reported when using my own data
lstm: /root/SLAHAN-master/compressor/include/s2s/corpus/batch.hpp:268: void s2s::batch::elmo2batch(unsigned int, unsigned int, const std::vector
&, const std::vector<std::vectors2s::token >&): Assertion `false' failed.
How can I fix it?
This error indicates that the number of tokens in a sentence is not the same between the feature vectors (from BERT or ELMO) and the received text. Thus, checking the number of spaces or control codes in the text may solve the problem. Note that you can see the number of tokens in the issued sentence at the line before the assertion error like the format NUM_OF_TOKENS_IN_FEATURE, NUM_OF_TOKENS_IN_TEXT
.