Efficient way of doing multiple MLPS

I want to create multiple independent MLPs. For example, my input has 1000 dimensions, I want to split it up into 10 groups of 100. I want 10 separate MLPs (no shared weights), each for one of the groups. Is there a way to do tis efficiently? Right now I am just creating 10 different MLPs, and looping through them in the forward call. But it seems to be quite slow.

I tried implementing it via a 1x1 convolution. It is much faster but I do not want the weight sharing.

2 Likes