Movie-Review-Sentiment-Analysis-LSTM-Pytorch
Movie-Review-Sentiment-Analysis-LSTM-Pytorch copied to clipboard
Length of valid_x and length of valid_y is not same
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)
My output is true but till now error at link 95.