我正在处理一个多类分类问题,为了好玩,我想尝试不同的模型。我发现了一个使用LSTM进行分类的blog,并试图调整我的模型以使其正常工作。这是我的模型: from tensorflow import keras from tensorflow.keras.layersimport Dense, Dropout, Activation, Bidirec
我正在研究这个LSTM网络:https://www.kaggle.com/paoloripamonti/twitter-sentiment-analysismodel.add(embedding_layer)model.add(LSTM(100, dropout=0.2, recurrent_dropout=0.2))
m
我已经创建了下面的ANN,有2个完全连接的层和一个递归。然而,在运行它时,我得到了错误:Exception: Input 0 is incompatible with layer lstm_11: expected ndim=3, found ndim=2,train_test_splitfrom sklearn.preprocessing import StandardScalermodel.add(Dense