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
dtype
MultiNestedTensor
MultiEmbeddingTensor
num_rows = 10 tensor_list = [ torch.rand((num_rows, 2, dtype=torch.float32), torch.rand((num_rows, 2, dtype=torch.long), ] MultiEmbeddingTensor.from_list(tensor_list) # should raise an exception or warning
You probably want to check if all items in xs are in the same dtype. If not, probably good to raise an error or a warning.
Originally posted by @yiweny in #181 (comment)
The text was updated successfully, but these errors were encountered:
We should either error out, raise a warning or simply documenting the behaviour, linking how PyTorch handles.
Sorry, something went wrong.
Good point! I think we can raise an informative error.
I feel like just documenting the behaviour is sufficient because PyTorch already makes it clear about type promotion https://pytorch.org/docs/stable/tensor_attributes.html#torch-dtype wdyt? (cc @yiweny)
akihironitta
No branches or pull requests
You probably want to check if all items in xs are in the same dtype. If not, probably good to raise an error or a warning.
Originally posted by @yiweny in #181 (comment)
The text was updated successfully, but these errors were encountered: