hi did it by remodelling as per as follows:

class coAtNet_Model(nn.Module):
    def __init__(self):
        super(coAtNet_Model, self).__init__()
        self.model = CoAtNet(3,224)
        self.add_1 = nn.Linear(9633792, 128) # 9633792 is actually batch_size* number of channels * image 
        self.dropout = nn.Dropout(0.1)
        self.out = nn.Linear(128 + 12, 1)
        
    def forward(self, image, tabular_data_inputs):
        x = self.model(image)
        x = self.add_1(torch.flatten(x))
        x = self.dropout(x)
        x = torch.cat([x, tabular_data_inputs], dim=1)
        x = self.out(x)
        
        return x

its working