It seems that in train.py line 82-101, the variable out seems to be not assigned if the encoder type is BiLSTM.
# Encoding
if ENCODER_STYLE == 'BiLSTM':
init_hidden = encoder.initHidden(batch_length)
encoder_hidden, encoder_hiddens = encoder(rt, re, rm, init_hidden)
# Store memory information
for ei in range(input_length):
encoder_outputs[:, ei] = encoder_hiddens[:, ei]
else:
encoder_hidden = encoder.initHidden(batch_length)
out, encoder_hidden = encoder(rt, re, rm, encoder_hidden)
# Store memory information
encoder_outputs = out.permute(1,0,2)
decoder_hidden = decoder.initHidden(batch_length)
decoder_hidden[0,:,:] = out[-1,:] # THE out HERE MAY NOT BE ASSIGNED IF BILSTM
It seems that in train.py line 82-101, the variable
out
seems to be not assigned if the encoder type is BiLSTM.