Thanks for the clarification.
So we basically have multiple predictions (7 numbers) using a multi-class classification (not multi-label).
In a multi-label classification, each sample might have more than one target class.
Using license plates this approach seems to be invalid, since neither a single figure can be more than one class (e.g. it’s either an A or a 7, but not both), nor does it make sense to use the multi-label classification on the whole license plate, since letters and numbers can be repeated.
Given that information, I think your approach looks good to me.
If you don’t like the code repetition, you could use a nn.ModuleList, creating and applying your linear layers in a loop. But it wouldn’t bother me that much.