y = y.long() does the job. There are similar methods for other data types, such as int, char, float and byte.
You can check different dtypes here.
y = y.long() does the job. There are similar methods for other data types, such as int, char, float and byte.
You can check different dtypes here.