Converting class target to regression targets

Hello,
I am not sure what you exactly mean:

  1. If your question is about casting data types, take a look at Casting data types
  2. If you want to run some kind of classification, maybe try to use CrossEntropyLoss or something closely related which should take care of that.

If you are just starting, I would recommend to do the PyTorch introduction and use a dataset with less dimensions, e.g. MNIST. From my experience, using those small datasets is much more convenient, since most of the basic methods can easily be transferred to more complex data and models, without requiring a lot of hardware.