The Difference Between Pytorch .to (device) and. cuda() Function in Python

This article mainly introduces the difference between pytorch .to (device) and .cuda() function in Python.