alan_ayu:

let the copy have an independent memory


That’s right. Assuming that the goal is to “let the copy have an independent memory” (by alan_ayu) and " initialize a new Variable using values from another " (by pietromarchesi) , we should use x.data.clone().
Otherwise, xx appears to be just a reference to value in x.