Is there any difference between to(), type() and type_as()? I don’t know why there is such need to have three implementations, especially what is the difference between to() and type(). It seems that xx.to(x.type()) will report error, while xx.to(torch.float) is correct. It seems to be better to combine them, or use to() only for changing device.