Training two-input model

The training loop for your two-input model will be a typical PyTorch training loop. The only change compared to the training loops you have written before is that now you have two inputs instead of one.

What is the correct way of iterating through the dataloader and passing the inputs to the model?

This exercise is part of the course

Intermediate Deep Learning with PyTorch

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise