Fix allow_inf in assertEqual (#16959)
authorSsnL <tongzhou.wang.1994@gmail.com>
Tue, 12 Feb 2019 15:49:48 +0000 (07:49 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 12 Feb 2019 15:56:34 +0000 (07:56 -0800)
commitf61f9e17578dc9c47e77500cd86f6a002e2062cf
tree7edc2fa72ada9316fa66e2c4f4b296286a8ae757
parentae1fc584ea3a55e5f483f7fd63e6de1b5453f79d
Fix allow_inf in assertEqual (#16959)

Summary:
gchanan pointed out in https://github.com/pytorch/pytorch/pull/16389 that `allow_inf` is treating `-inf` and `inf` as equal. This fixes it.

Also fixing #16448 since it's near and 2.1 has released.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16959

Differential Revision: D14025297

Pulled By: gchanan

fbshipit-source-id: 95348309492e7ab65aa4d7aabb5a1800de66c5d6
test/common_utils.py