Sorry for the confusion. Basically it boils down to this…  I have a dense layer which I would like to remain common to all samples from a batch…

Screen Shot 2021-05-09 at 9.09.47 AM1080×1200 78.2 KB

Ideally I would not want to duplicate that common layer n_batch times since it’s always the same.  I am currently creating a new tensor of ones the size of my batch of samples, and the width of the common layer.  Then multiplying by the common layer and using torch.cat() to join them, but this just feels wrong.