well because you only have a two linear layers you can actually collapse the inp to a shape of (batch, 252) and the target to (batch, 88), where the batch is just a concatenation of all the different items, to a single axis.