Change Binary Matrix used in Cross Entropy

Hello! I have a small background in DL but just started using Fastai recently.
I cannot figure out how to do the following, (also please correct me if I’m wrong at any point)

I want to classify images, so I’m going to use cnn_learner. But I don’t want the labels, for example: y = [0,1,1,2] to be turned into
1 0 0
0 1 0
0 1 0
0 0 1

when the model actually runs
(or perhaps the transpose of that, I forget which way it goes)

I want to supply my own matrix for the cross entropy loss function, that isn’t strictly binary.

How could I go about doing this?