RuntimeError: For unbatched 2-D input, hx and cx should also be 2-D but got (3-D, 3-D) tensors
hey I have some problems with my LSTM. I have 6 features and I´m sending all my data (29002 rows) in the LSTM at once (is this a good idea?). My Input is of size: Training Shape torch.Size([290002, 1, 6]) torch.Size([290002, 1]) Testing Shape torch.Size([74998, 1, 6]) torch.Size([74998, 1]) my model: class LSTM(nn.Module): def __init__(self, hidden_dim_LSTM, num_layers_LSTM, hidden1, drop): super(LSTM, self).__init__() self.hidden_dim_LSTM = hidden_dim_LSTM self.num_layers_LSTM = num_layers_LSTM self.hidden1=hidden1 self.drop=drop final_output_dim = 1 #self.lstm = nn.LSTM(self.input_dim, self.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.