I got the RuntimeError: input must have 3 dimensions, got 2 in y_pred, state_sent, _ = sent_attn_model(s, state_sent), It seems the dimensions of the s is 2, but the sent_attn_model need 3.
If a particular document has only one sentence, this code would give you an error. You can try to fix it by not looping when length of sentence is only one. That should ideally fix it :)
I got the
RuntimeError: input must have 3 dimensions, got 2
iny_pred, state_sent, _ = sent_attn_model(s, state_sent)
, It seems the dimensions of thes
is 2, but the sent_attn_model need 3.