Tensor subclass now support deepcopy!

As part of our work to increase the coverage for Tensor subclass significantly, we now have proper serialization and deepcopy support for them! add deepcopy support to subclasses by albanD · Pull Request #65584 · pytorch/pytorch · GitHub

This will ensure that slots, attributes and the subclass itself is properly preserved through these mechanisms.

Note that for now, plain Tensor don’t save manual attributes during serialization (which we should fix?).

Stay tuned for more detailed docs here on how to use custom subclass and how to use them to create your own Tensor type!