Closed Peter-72 closed 2 years ago
In decoders.py, you will find that both lstm and bi-lstm hidden size is assigned the value self.gru_size instead of self.lstm_size:
decoders.py
hidden size
self.gru_size
self.lstm_size
elif self.decoder_type == 'lstm': self.lstm_input_size = n_output_channels self.lstm_size = decoder_size self.fc_size = self.lstm_size self.lstm = nn.LSTM(input_size=self.lstm_input_size, hidden_size=self.gru_size, num_layers=2, batch_first=True, bidirectional=False, dropout=0.3) init_gru(self.lstm) elif self.decoder_type == 'bilstm': self.lstm_input_size = n_output_channels self.lstm_size = decoder_size self.fc_size = self.lstm_size * 2 self.lstm = nn.LSTM(input_size=self.lstm_input_size, hidden_size=self.gru_size, num_layers=2, batch_first=True, bidirectional=True, dropout=0.3)
which will cause AttributeError: 'SeldDecoder' object has no attribute 'gru_size'. Both hidden sizes needs to be hidden_size=self.lstm_size
AttributeError: 'SeldDecoder' object has no attribute 'gru_size'
hidden_size=self.lstm_size
Using Windows 10, Chrome Browser v101.0.4951.67
In
decoders.py
, you will find that both lstm and bi-lstmhidden size
is assigned the valueself.gru_size
instead ofself.lstm_size
:which will cause
AttributeError: 'SeldDecoder' object has no attribute 'gru_size'
. Both hidden sizes needs to behidden_size=self.lstm_size
Using Windows 10, Chrome Browser v101.0.4951.67