Skip to content

Instantly share code, notes, and snippets.

@zeneofa
Created April 2, 2020 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeneofa/9811992dc56863983a1d20dee25b54c2 to your computer and use it in GitHub Desktop.
Save zeneofa/9811992dc56863983a1d20dee25b54c2 to your computer and use it in GitHub Desktop.
# on random data, using pytorch nightly
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-7-8e0bb34a545a> in <module>
17
18
---> 19 score, y_pred1,y_pred2 = model(x1,x2) #train
20 optimizer.zero_grad()
21
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
556 result = self._slow_forward(*input, **kwargs)
557 else:
--> 558 result = self.forward(*input, **kwargs)
559 for hook in self._forward_hooks.values():
560 hook_result = hook(self, input, result)
<ipython-input-3-e9430b51afae> in forward(self, seq1, seq2)
40 h1 = X1.new_zeros(self.num_layers*2,N,self.embedding_dim)
41 h1.normal_()
---> 42 y1, _ = self.decoder(encoded1,h1)
43 y1 = y1[:seqLen1]
44
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
556 result = self._slow_forward(*input, **kwargs)
557 else:
--> 558 result = self.forward(*input, **kwargs)
559 for hook in self._forward_hooks.values():
560 hook_result = hook(self, input, result)
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\rnn.py in forward(self, input, hx)
725 if batch_sizes is None:
726 result = _VF.gru(input, hx, self._flat_weights, self.bias, self.num_layers,
--> 727 self.dropout, self.training, self.bidirectional, self.batch_first)
728 else:
729 result = _VF.gru(input, batch_sizes, hx, self._flat_weights, self.bias,
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
### after a few epoch
EPOCH 0, TRAINING_LOSS (2.2211820125579833, 0.09678182060993716), VALIDATION_LOSS (1.9168838739395142, 0.1996632924416813), DURATION 3.023939847946167s
EPOCH 1, TRAINING_LOSS (2.034844923019409, 0.15472564236398484), VALIDATION_LOSS (2.109210205078125, 0.28845978025577057), DURATION 3.3116555213928223s
EPOCH 2, TRAINING_LOSS (2.189433765411377, 0.3070423362611613), VALIDATION_LOSS (2.024661064147949, 0.3095052250150218), DURATION 3.024496078491211s
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-6-8e0bb34a545a> in <module>
17
18
---> 19 score, y_pred1,y_pred2 = model(x1,x2) #train
20 optimizer.zero_grad()
21
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
556 result = self._slow_forward(*input, **kwargs)
557 else:
--> 558 result = self.forward(*input, **kwargs)
559 for hook in self._forward_hooks.values():
560 hook_result = hook(self, input, result)
<ipython-input-2-e9430b51afae> in forward(self, seq1, seq2)
31 h0.normal_()
32
---> 33 _, last_hidden2 = self.encoder(X2,h0)
34 encoded2 = last_hidden2[-1].repeat((len(X2),1,1))
35
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
556 result = self._slow_forward(*input, **kwargs)
557 else:
--> 558 result = self.forward(*input, **kwargs)
559 for hook in self._forward_hooks.values():
560 hook_result = hook(self, input, result)
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\rnn.py in forward(self, input, hx)
725 if batch_sizes is None:
726 result = _VF.gru(input, hx, self._flat_weights, self.bias, self.num_layers,
--> 727 self.dropout, self.training, self.bidirectional, self.batch_first)
728 else:
729 result = _VF.gru(input, batch_sizes, hx, self._flat_weights, self.bias,
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
### and this also occurs
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-6-8e0bb34a545a> in <module>
17
18
---> 19 score, y_pred1,y_pred2 = model(x1,x2) #train
20 optimizer.zero_grad()
21
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
556 result = self._slow_forward(*input, **kwargs)
557 else:
--> 558 result = self.forward(*input, **kwargs)
559 for hook in self._forward_hooks.values():
560 hook_result = hook(self, input, result)
<ipython-input-2-e9430b51afae> in forward(self, seq1, seq2)
25 h0.normal_()
26
---> 27 _, last_hidden1 = self.encoder(X1,h0)
28 encoded1 = last_hidden1[-1].repeat((len(X1),1,1))
29
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
556 result = self._slow_forward(*input, **kwargs)
557 else:
--> 558 result = self.forward(*input, **kwargs)
559 for hook in self._forward_hooks.values():
560 hook_result = hook(self, input, result)
~\AppData\Local\Continuum\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\rnn.py in forward(self, input, hx)
725 if batch_sizes is None:
726 result = _VF.gru(input, hx, self._flat_weights, self.bias, self.num_layers,
--> 727 self.dropout, self.training, self.bidirectional, self.batch_first)
728 else:
729 result = _VF.gru(input, batch_sizes, hx, self._flat_weights, self.bias,
RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment