We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SPM_toolkit/DecAtt/main_quora.py
Line 56 in 3e2cb35
cat(): argument 'tensors' (position 1) must be tuple of Tensors, not generator
can I fix this bug use this line?
torch.cat(tuple([dict[word].view(1, -1) for word in lsent]))
The text was updated successfully, but these errors were encountered:
torch.cat([dict[word].view(1, -1) for word in lsent])
is this also ok ?
Sorry, something went wrong.
Hi caoxu, I tried your second answer in other code: https://github.com/lanwuwei/Subword-PWIM/blob/6e9ef11fa404c4ea6e350f8e75f7d1055869d8d9/model.py#L436 In my PyTorch version 0.4.0, both are OK. You can modify the code based on your version.
@lanwuwei Thanks for your help, I find my pytorch version is not 0.4.0.
No branches or pull requests
SPM_toolkit/DecAtt/main_quora.py
Line 56 in 3e2cb35
cat(): argument 'tensors' (position 1) must be tuple of Tensors, not generator
can I fix this bug use this line?
torch.cat(tuple([dict[word].view(1, -1) for word in lsent]))
The text was updated successfully, but these errors were encountered: