You can remove all the .data and replace them with:
@torch.no_grad()
def weights_init(m):
  # Your code

And yes this will reinitialize all the weights with random values.
You might be interested by the torch.nn.init 15 package that gives you many common initialization methods.