Questions tagged [bilstm]

51 questions
0
votes
0 answers

ValueError: too many values to unpack (expected 2) with RNN classifier

Hello i am having this error while i am trying to train an RNN classifier with pytorch. I hope someone can help me to fix it or explain me the reason. train_loader2=embeddings_train train_loader2=torch.from_numpy(embeddings_train) train_loader2 =…
KhalilBR
  • 75
  • 1
  • 1
  • 5
0
votes
0 answers

Question About Stacked BiLSTM (Multi-layer BiLSTM)

I noticed that the single-layer BiLSTM comprises of two independent (unidirectional) LSTM layers, one for forward direction and the other for reverse. Then the outputs of two LSTM layers will be concatenated together, along with the hidden dim…
zZer0o
  • 31
  • 5
0
votes
0 answers

Input 0 of layer time_distributed_30 is incompatible with the layer: expected ndim=5, found ndim=4. Full shape received: (None, None, None, None)

I am trying for classification of MSTAR data set with 10 classes I have used the modal that contains DCNN and BILSTM with 15 time steps My questions are: How to overcome the error How to get the good classification results. My code…
Sairam
  • 1
  • 1
0
votes
0 answers

ValueError: Target size (torch.Size([8])) must be the same as input size (torch.Size([8, 2]))

I'm trying to implement a code for sentiment analysis( positive or negative labels) using BERT and i want to add a BiLSTM layer to see if I can increase the accuracy of the pretrained model from HuggingFace. I have the below code and a few questions…
-1
votes
1 answer

Bert embedding layer raises 'ValueError: A target array with shape ' with BiLSTM in keras tensorflow

I've problems integrating Bert Embedding Layer in a BiLSTM model for text classification task. My dataset is in the form where each row has 2 columns: text and polarity text = string/tweet polarity = can be 0 or 1 So the shape of training data is…
user18630856
-1
votes
1 answer

How to set custom initial weights to biLSTM layer Keras?

I am currently working on building BiLSTM with Attention with the BiLSTM layer weights being optimised using Antlion Algorithm. The Antlion Alogrithm is in MATLAB code and I am able to integrate Python and MATLAB to receive the optimised weights as…
1 2 3
4