New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seq2Seq Example with GPU Support #60
Comments
Hi, thank you for your interest in texar-pytorch! Your training settings seems correct to me. Did you encounter any errors during training? If so, could you describe those errors (e.g. stacktrace or error messages)? |
Hey, this is the error:
So somewhere I am missing the ".cuda()". I looked a little bit into the code. The LinearLayer (torch.nn.Linear) initializes a weight matrix, that is not a cuda matrix. But I am not so sure if this is the problem, as i just started with pytorch.
|
When changing the calculation of the weight like this (in torch.nn.Linear) (but i dont think thats a good idea anyways)
i get the following error after 312 steps:
|
I see. This is indeed a bug in texar-pytorch. In lines 539-543 of We're going to fix this ASAP. In the meantime, you can change these lines into: self._attention_layers = nn.ModuleList(
nn.Linear(attention_mechanisms[i].encoder_output_size +
cell.hidden_size,
attention_layer_sizes[i],
False) for i in range(len(attention_layer_sizes))) to work around the issue. @gpengzhi Can you fix this issue soon? |
... and the error after 312 steps is another problem. That was during validation, where the model created an To fix this, change line 107 of end_token=start_token.new_full((1,), self.eos_token_id)) |
hey, so i tried
and i got this error:
|
Thank you for your feedback. You could try |
Thanks, this seems to fix this issue. However, now I get the following error:
|
Thank you for the feedback. This issue happens when one tries to convert a tensor value stored in the GPU (cuda) to numpy. Use |
Hello,
How can I run the Seq2Seq example with my GPU?
I already modified the training data to use the cuda device as well as the model:
The text was updated successfully, but these errors were encountered: