make class types callable (#26743)
Summary:
Allowing invoking of a UDT if they have a `__call__` method
Fix for https://github.com/pytorch/pytorch/issues/26725
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26743
Differential Revision: D17677795
Pulled By: eellison
fbshipit-source-id: 0ceb6088e22c4689e0735fdb9e07418a75603486