SLAHAN icon indicating copy to clipboard operation
SLAHAN copied to clipboard

Errors are reported when using my own data

Open PhyllisJi opened this issue 3 years ago • 1 comments

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?

PhyllisJi avatar Feb 17 '22 08:02 PhyllisJi

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.

kamigaito avatar Feb 27 '22 16:02 kamigaito