Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

assertion failed: [All values in memory_sequence_length must greater than zero. #474

Open
nashid opened this issue Jun 10, 2020 · 1 comment

Comments

@nashid
Copy link

nashid commented Jun 10, 2020

NMT is failing at the time of training:

InvalidArgumentError (see above for traceback): assertion failed: [All values in memory_sequence_length must greater than zero.] [Condition x > 0 did not hold element-wise:] [x (IteratorGetNext:1) = ] [8 8 8...]

[[Node: dynamic_seq2seq/decoder/decoder/while/BasicDecoderStep/decoder/attention/assert_positive/assert_less/Assert/Assert = Assert[T=[DT_STRING, DT_STRING, DT_STRING, DT_INT32], summarize=3, _device="/job:localhost/replica:0/task:0/device:CPU:0"](dynamic_seq2seq/decoder/decoder/while/BasicDecoderStep/decoder/attention/assert_positive/assert_less/All, 

dynamic_seq2seq/decoder/decoder/while/BasicDecoderStep/decoder/attention/assert_positive/assert_less/Assert/Assert/data_0, dynamic_seq2seq/decoder/decoder/while/BasicDecoderStep/decoder/attention/assert_positive/assert_less/Assert/Assert/data_1, dynamic_seq2seq/decoder/decoder/while/BasicDecoderStep/decoder/attention/assert_positive/assert_less/Assert/Assert/data_2, dynamic_seq2seq/decoder/decoder/while/BasicDecoderStep/decoder/attention/assert_positive/assert_less/Less/Enter)]]

I don't have any empty line in the train, test, or validation dataset. Any ideas?

@nashid
Copy link
Author

nashid commented Jun 10, 2020

Found the issue, some input line consisted of multiple spaces which NMT failed to handle i.e.:

aa.  a. a. aa
abc         abd
zcc dwawdfeef

Apparently, here line2 was the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant