This repository has been archived by the owner on Nov 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 800
RuntimeError: bool value of Tensor with more than one value is ambiguous #934
Comments
Updating code locally to correctly compare the tensors at the end helps here.
|
hudeven
added a commit
to hudeven/pytext
that referenced
this issue
Aug 26, 2019
1. "==" is equivalent to torch.eq() which returns multi-dimensional Tensor and causes "RuntimeError: bool value of Tensor with more than one value is ambiguous" facebookresearch#934 2. torch.equal(): returns True if two tensors have the same size and elements, False otherwise.
11 tasks
Thanks @hudeven :-) . |
One more thing, there is an additional bracket at the following line - |
facebook-github-bot
pushed a commit
that referenced
this issue
Aug 28, 2019
Summary: #528 Motivation and Context 1. "==" is equivalent to torch.eq() which returns multi-dimensional Tensor and causes "RuntimeError: bool value of Tensor with more than one value is ambiguous" 2. torch.equal(): returns True if two tensors have the same size and elements, False otherwise. #934 ## How Has This Been Tested N/A, tutorial update ## Types of changes - [x] Docs change / refactoring / dependency upgrade - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist - [x] My code follows the code style of this project. - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. - [x] I have completed my CLA (see **CONTRIBUTING**) - [ ] I have added tests to cover my changes. - [x] All new and existing tests passed. Pull Request resolved: #939 Reviewed By: chenyangyu1988 Differential Revision: D17102957 Pulled By: hudeven fbshipit-source-id: 8b584b895b459bcd84f24286535b8b16f0093d88
mwu1993
pushed a commit
to mwu1993/pytext-1
that referenced
this issue
Sep 11, 2019
Summary: facebookresearch#934 Reviewed By: chenyangyu1988 Differential Revision: D17295128 fbshipit-source-id: 011b034cf7ccaee0752263f8ce86b1889f2ea923
facebook-github-bot
pushed a commit
that referenced
this issue
Sep 11, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Steps to reproduce
Execute steps to test Custom Tensorizer - https://pytext.readthedocs.io/en/master/tensorizer.html
Observed Results
Expected Results
The test should pass.
The text was updated successfully, but these errors were encountered: