Commit f9c0a08
Fix len() for tensors (#13398)
Summary:
Fixes #13376, `len(tensor)` was converting tensor to a 1 element list and returning 1 every time.
Pull Request resolved: #13398
Differential Revision: D12867630
Pulled By: driazati
fbshipit-source-id: 28f3580a072d763df0980b3149c49d1894842ec91 parent 9577811 commit f9c0a08
2 files changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3511 | 3511 | | |
3512 | 3512 | | |
3513 | 3513 | | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
3514 | 3520 | | |
3515 | 3521 | | |
3516 | 3522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| 784 | + | |
784 | 785 | | |
785 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
786 | 798 | | |
787 | 799 | | |
788 | 800 | | |
| |||
799 | 811 | | |
800 | 812 | | |
801 | 813 | | |
| 814 | + | |
802 | 815 | | |
803 | 816 | | |
804 | 817 | | |
| |||
0 commit comments