Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Feed the target as the next input
- for di in range(target_length):
- # The ouput of different steps
- decoder_output, decoder_hidden, decoder_attention = decoder(
- decoder_input, decoder_hidden, encoder_outputs)
- # Calculate the NLLLoss fro each step
- loss += criterion(decoder_output, summary[:, di])
- decoder_input = summary[:, di] # Supervised
- # Calculate the gradient
- loss.backward()
Add Comment
Please, Sign In to add comment