Returns True if obj is a PyTorch tensor.
Note that this function is simply doing
isinstance(obj, Tensor). Using that
isinstancecheck is better for typechecking with mypy, and more explicit - so it’s recommended to use that instead of
obj (Object) – Object to test