No. .detach()  is to detach a tensor from the network graph,  making the tensor no gradient,  while ‘.data’ is only to obtain tensor-data from Variable. They have different functions, which are used in different cases.