How to get the device type of a pytorch module conveniently?
How to get the device type of a pytorch module conveniently? Question: I have to stack some my own layers on different kinds of pytorch models with different devices. E.g. A is a cuda model and B is a cpu model (but I don’t know it before I get the device type). Then the new …