Error: forward() missing positional argument
I'm trying to implement a model with multiple input images, something similar to this: https://rosenfelder.ai/multi-input-neural-network-pytorch/
Here is my model:
class FaceModel(pl.LightningModule):
    def __init__(self):
        super().__init__()
        self.example_input_array = torch.rand(1, 3, 64, 64)

        self.face_c1 = nn.Conv2d(3, 16, 3)
        self.face_p1 = nn.MaxPool2d(2, 2)
        self.face_c2 = nn.Conv2d(16, 32, 3)
        self.face_p2 = nn.MaxPool2d(2, 2)

        self.l_eye_c1 = nn.Conv2d(3, 16, 3)
        self.l_eye_p1 = nn.MaxPool2d(2, 2)
        self.l_eye_c2 = nn.Conv2d(16, 32, 3)
        self.l_eye_p2 = nn.MaxPool2d(2, 2)

        self.fc1 = nn.Linear(12544, 32)
        self.fc2 = nn.Linear(32, 2)

    def forward(self, face, l_eye):
        face = self.face_p1(F.relu(self.face_c1(face)))
        face = self.face_p2(F.relu(self.face_c2(face)))
        face = face.view(-1, 32 * 14 * 14)

        l_eye = self.l_eye_p1(F.relu(self.l_eye_c1(l_eye)))
        l_eye = self.l_eye_p2(F.relu(self.l_eye_c2(l_eye)))
        l_eye = l_eye.view(-1, 32 * 14 * 14)

        out = torch.cat((face, l_eye), dim=1)

        out = F.relu(self.fc1(out))
        out = self.fc2(out)
        return out

    def configure_optimizers(self):
        optimizer = optim.Adam(self.parameters(), lr=1e-5)
        return optimizer

    def training_step(self, batch, batch_idx):
        face, l_eye = batch['face'], batch['l_eye']
        y_hat = self(face, l_eye)
        loss = F.mse_loss(y_hat, batch['targets'])
        self.log('train_loss', loss)
        return loss

    def validation_step(self, batch, batch_idx):
        y_hat = self(batch['face'], batch['l_eye'])
        val_loss = F.mse_loss(y_hat, batch['targets'])
        self.log('val_loss', val_loss)
        return val_loss

    def test_step(self, batch, batch_idx):
        y_hat = self(batch['face'], batch['l_eye'])
        loss = F.mse_loss(y_hat, batch['targets'])
        self.log('test_loss', loss)
        return loss


img_types = ['face', 'l_eye']
d_train, d_val, d_test = create_datasets(*img_types, batch_size=128)

logger = TensorBoardLogger(save_dir='logs', name='multi', log_graph=True)
model = FaceModel()
trainer = pl.Trainer(logger=logger, gpus=1, max_epochs=20, benchmark=True)
trainer.fit(model, train_dataloader=d_train, val_dataloaders=d_val)

I keep getting the following error and I'm not sure why:
TypeError: forward() missing 1 required positional argument: 'l_eye'
So my forward method takes both a face and a l_eye, but I feel like both are being supplied during the training step here:
face, l_eye = batch['face'], batch['l_eye']
y_hat = self(face, l_eye)

I cant see where else forward is being called (somewhere under the hood?), or where else I'm meant to be supplying my second set of images