These versions track how many times a Tensor has been modified inplace. The version increase every time you modify it.
You cannot change the version manually. If you see error with wrong version, you need to remove inplace operations to avoid the version to be bumped.