xla
xla copied to clipboard
subclass of torchTensor not handled correctly
there are five instances of code like this in the repo:
if type(v) == torch.Tensor:
This is incorrect because it does not handle subclasses of torch.Tensor. The correct approach is:
if isinstance(v, torch.Tensor):