During dealing with the in-place operation problem of autograd, I faced sth like below.
model.py:
class MyModel(nn.Module):
    def __init__(self, *args):
        super(MyModel, self).__init__()
        self.device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
        self.X = torch.ones(200).long().to(device)

        ...
    def forward(self, *args1):
        print(self.X._version) # prints out 1 not 0
        print(torch.ones(1).long().to(self.device)._version) # prints out 0

        #whats happening?

1.Why is it happening?
2.Is it a good practice (or sth desired to be done) to maintain the torch.Tensor._version during the forward pass (say if it starts with 1 then it maintains 1 until it meets loss.backward in train.py ?