The question still has to be of quality before it'd make sense to bring it over from somewhere else.
The question in full reads:
Sorry for maybe super basic question but could not find it.
What is a correct Pytorch way to encode multi-class target variable?
I have > 30 target classes for target variable - like AA, AB, BB, BA,
Should I use ScikitLearn tools and then convert numpy arrays into
Or there is built-in functionality?
...which, if we boil this down to what the actual question is, turns into...
I have > 30 target classes for target variable - like AA, AB, BB, BA, BC .... What is a correct Pytorch way to encode multi-class target variable?
...which is barely even a good question since it lacks the pillars of quality that we ask for (e.g. what was attempted, what error messages one encountered, etc).
If the question isn't good enough to port over from somewhere else on the Internet, then the answer doesn't have any legs to stand on. Good answers are spawned off of questions, and I'm barely seeing a good one here.
So no, don't copy this over from this forum. I would argue that it's where it needs to be in the way it needs to be in, and it can still be of value to others who look for it.
(insert blurb about plagiarism here - don't copy without attribution etc etc)