mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Signed-off-by: Edward Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/162163 Approved by: https://github.com/albanD, https://github.com/Skylion007
16 lines
250 B
Markdown
16 lines
250 B
Markdown
# Testing
|
|
|
|
Use our test class and test runner:
|
|
|
|
```
|
|
from torch.testing._internal.common_utils import run_tests, TestCase
|
|
|
|
class TestFeature(TestCase):
|
|
...
|
|
|
|
if __name__ == "__main__":
|
|
run_tests()
|
|
```
|
|
|
|
To test Tensor equality, use assertEqual.
|