@ptrblck having looked in more detail at the problem, I now see that the warning is generated at image load time, not at the moment of transform; as @naveenvemy suggested in read_sn3_pascalvincent_tensor of mnist.py.
The read_sn3_pascalvincent_tensor function ends with:
return torch.from_numpy(parsed.astype(m[2], copy=False)).view(*s)
which generates the warning. Should copy=True?