Movie-Review-Sentiment-Analysis-LSTM-Pytorch icon indicating copy to clipboard operation
Movie-Review-Sentiment-Analysis-LSTM-Pytorch copied to clipboard

Length of valid_x and length of valid_y is not same

Open superryeti opened this issue 5 years ago • 1 comments

https://github.com/lukysummer/Movie-Review-Sentiment-Analysis-LSTM-Pytorch/blob/587d35c6cb16b5e096014dc26766a340c3cc0ca4/sentiment_analysis_LSTM.py#L88

valid_x, valid_y = padded_features[:train_cutoff : valid_cutoff], encoded_labels[train_cutoff : valid_cutoff]
print(len(valid_x),len(valid_y))

Output

(1, 5000)

Instead, it should be

valid_x, valid_y = padded_features[train_cutoff : valid_cutoff], encoded_labels[train_cutoff : valid_cutoff]
print(len(valid_x),len(valid_y))

So output would be

(5000, 5000)

superryeti avatar Nov 12 '19 11:11 superryeti

My output is true but till now error at link 95.42112128795A40F987D247513CCCF8BD.png

Mkhubaiib avatar Dec 11 '22 03:12 Mkhubaiib