pytorch
5e4bcb04 - Improve readability of the extra message errors in assertEqual (#87202)

Commit
3 years ago
Improve readability of the extra message errors in assertEqual (#87202) Goes from (note the `linspace.default` is very difficult to find) ``` Mismatched elements: 15 / 50 (30.0%) Greatest absolute difference: 1 at index (17,) Greatest relative difference: 1.0 at index (17,) : linspace.default args = (0, -3, 50) kwargs = {'dtype': torch.int16, 'device': device(type='cpu'), 'pin_memory': False} ``` to ``` Mismatched elements: 15 / 50 (30.0%) Greatest absolute difference: 1 at index (17,) Greatest relative difference: 1.0 at index (17,) linspace.default args = (0, -3, 50) kwargs = {'dtype': torch.int16, 'device': device(type='cpu'), 'pin_memory': False} ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/87202 Approved by: https://github.com/ezyang
Author
Committer
Parents
Loading