RuntimeError: Boolean value of Tensor with more than one value is ambiguous in xLSTM/slstm.py
RuntimeError: Boolean value of Tensor with more than one value is ambiguous in xLSTM/slstm.py
Issue Description
I'm encountering a RuntimeError when attempting to execute a backward pass in my xLSTM model. The error message is:
RuntimeError: Boolean value of Tensor with more than one value is ambiguous
This issue occurs in the slstm.py module, specifically at line 53 during a forward pass. Here's the relevant code snippet:
if i < self.num_layers - 1:
# Further operations
It seems the variable i, which is expected to be an integer index, is somehow being interpreted as a tensor, leading to an ambiguous boolean condition in the if statement. This happens during the operation lstm_output, hidden_state = self.lstm(input_seq, hidden_state), suggesting that there might be an issue with how the LSTM output or hidden state is handled or initialized.
Request for Help Could someone help clarify what might be going wrong here or suggest modifications to avoid this issue? Any guidance would be greatly appreciated.
Thank you!
@muditbhargava66 This is actually a duplicate of the issue described here https://github.com/muditbhargava66/PyxLSTM/issues/4
Stale issue message