0%| | 0/11 [00:00<?, ?it/s]
enc_inputs torch.Size([21, 128]) <class 'torch.cuda.LongTensor'>
enc_embeddings torch.Size([21, 128, 256]) <class 'torch.cuda.FloatTensor'>
enc_embeddings torch.Size([21, 128, 256]) <class 'torch.cuda.FloatTensor'>
hidden torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
hidden torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
GO torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
dec_input torch.Size([128]) <class 'torch.cuda.LongTensor'>
dec_input_emb torch.Size([128, 256]) <class 'torch.cuda.FloatTensor'>
topi torch.Size([128, 1]) <class 'torch.cuda.LongTensor'>
predicted_outputs torch.Size([21, 128, 256]) <class 'torch.cuda.FloatTensor'>
predicted_outputs torch.Size([2688, 6005]) <class 'torch.cuda.FloatTensor'>
predicted_outputs torch.Size([21, 128, 6005]) <class 'torch.cuda.FloatTensor'>
0 - loss: 182.9229736328125
100 - loss: 71.56849670410156
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-25-91808252fcff> in <module>()
----> 1 train_epochs(10, encoder, decoder, eoptim, doptim, criterion,)
<ipython-input-14-857c2bff2705> in train_epochs(epochs, encoder, decoder, eoptim, doptim, criterion, print_every)
9 for epoch in tqdm(range(epochs+1)):
10 loss = train(encoder, decoder, eoptim, doptim, criterion, idx_q, idx_a,
---> 11 print_every=print_every*100)
12 if epoch % print_every == 0:
13 losses.append(loss)
<ipython-input-14-857c2bff2705> in train(encoder, decoder, eoptim, doptim, criterion, question_ids, answer_ids, print_every)
39
40 encoder_output = encoder(data, initial_hidden, _batch_size)
---> 41 decoder_output = decoder(target, encoder_output, _batch_size)
42 loss = 0
43 for i in range(input_length):
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
204
205 def __call__(self, *input, **kwargs):
--> 206 result = self.forward(*input, **kwargs)
207 for hook in self._forward_hooks.values():
208 hook_result = hook(self, input, result)
<ipython-input-23-30da90a7f90a> in forward(self, outputs, hidden, batch_size)
63 psize('\tdec_input_emb', dec_input_emb)
64
---> 65 hidden, cell_state = self.decode(dec_input_emb, (hidden, cell_state))
66 predicted_outputs.append(hidden)
67
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
204
205 def __call__(self, *input, **kwargs):
--> 206 result = self.forward(*input, **kwargs)
207 for hook in self._forward_hooks.values():
208 hook_result = hook(self, input, result)
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/nn/modules/rnn.py in forward(self, input, hx)
497 input, hx,
498 self.weight_ih, self.weight_hh,
--> 499 self.bias_ih, self.bias_hh,
500 )
501
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/nn/_functions/rnn.py in LSTMCell(input, hidden, w_ih, w_hh, b_ih, b_hh)
25 ingate = F.sigmoid(ingate)
26 forgetgate = F.sigmoid(forgetgate)
---> 27 cellgate = F.tanh(cellgate)
28 outgate = F.sigmoid(outgate)
29
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/nn/functional.py in tanh(input)
420
421 def tanh(input):
--> 422 return torch.tanh(input)
423
424
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/autograd/variable.py in tanh(self)
346
347 def tanh(self):
--> 348 return Tanh()(self)
349
350 def tanh_(self):
/home/paarulakan/environments/python/pytorch-py35/lib/python3.5/site-packages/torch/autograd/_functions/pointwise.py in forward(self, i)
46 result = i.tanh_()
47 else:
---> 48 result = i.tanh()
49 self.save_for_backward(result)
50 return result
KeyboardInterrupt: