Each forward pass expects 6 images(ProjModule) as input.
So, the dims. I want to define are [batch,n_images(i.e. 6),channels(i.e. 3),width,height]
There is a one more 1 which I am using as of now because VGGkModule is throwing an error saying expecting 3 dimensions. but when I add one more dimension, it works.
VGGkModule expects 5 images
class VGGkModule(nn.Module):
    def __init__(self):
        super(VGGkModule,self).__init__()
        self.layer1 = models.vgg16('pretrained=true')
     
    def forward(self,x):
        x = x.view(-1,5,3,224,224)
        y1 = self.layer1(x[:,0])
        y2 = self.layer1(x[:,1])
        y3 = self.layer1(x[:,2])
        y4 = self.layer1(x[:,3])
        y5 = self.layer1(x[:,4])
        par = TableModule()
        rep = par([y1,y2,y3,y4,y5],0)
        m = rep.view(-1,1000,1,5)
        pool = nn.MaxPool1d(5)
        out = pool(m)
        return out.view(-1,1000)


Trying this,
ValueError: expected 3D input (got 4D input)